[gram.module]

# Annex A (informative) Grammar summary [[gram]](./#gram)

## A.8 Modules [gram.module]

[module-declaration:](module.unit#nt:module-declaration "10.1 Module units and purviews [module.unit]")  
export-keywordopt module-keyword [*module-name*](module.unit#nt:module-name "10.1 Module units and purviews [module.unit]") [*module-partition*](module.unit#nt:module-partition "10.1 Module units and purviews [module.unit]")opt [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1 Attribute syntax and semantics [dcl.attr.grammar]")opt ;

[module-name:](module.unit#nt:module-name "10.1 Module units and purviews [module.unit]")  
[*module-name-qualifier*](module.unit#nt:module-name-qualifier "10.1 Module units and purviews [module.unit]")opt [*identifier*](lex.name#nt:identifier "5.11 Identifiers [lex.name]")

[module-partition:](module.unit#nt:module-partition "10.1 Module units and purviews [module.unit]")  
: [*module-name-qualifier*](module.unit#nt:module-name-qualifier "10.1 Module units and purviews [module.unit]")opt [*identifier*](lex.name#nt:identifier "5.11 Identifiers [lex.name]")

[module-name-qualifier:](module.unit#nt:module-name-qualifier "10.1 Module units and purviews [module.unit]")  
[*identifier*](lex.name#nt:identifier "5.11 Identifiers [lex.name]") .  
[*module-name-qualifier*](module.unit#nt:module-name-qualifier "10.1 Module units and purviews [module.unit]") [*identifier*](lex.name#nt:identifier "5.11 Identifiers [lex.name]") .

[export-declaration:](module.interface#nt:export-declaration "10.2 Export declaration [module.interface]")  
export [*name-declaration*](dcl.pre#nt:name-declaration "9.1 Preamble [dcl.pre]")  
export { [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1 Preamble [dcl.pre]")opt }  
export-keyword [*module-import-declaration*](module.import#nt:module-import-declaration "10.3 Import declaration [module.import]")

[module-import-declaration:](module.import#nt:module-import-declaration "10.3 Import declaration [module.import]")  
import-keyword [*module-name*](module.unit#nt:module-name "10.1 Module units and purviews [module.unit]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1 Attribute syntax and semantics [dcl.attr.grammar]")opt ;  
import-keyword [*module-partition*](module.unit#nt:module-partition "10.1 Module units and purviews [module.unit]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1 Attribute syntax and semantics [dcl.attr.grammar]")opt ;  
import-keyword [*header-name*](lex.header#nt:header-name "5.6 Header names [lex.header]") [*attribute-specifier-seq*](dcl.attr.grammar#nt:attribute-specifier-seq "9.13.1 Attribute syntax and semantics [dcl.attr.grammar]")opt ;

[global-module-fragment:](module.global.frag#nt:global-module-fragment "10.4 Global module fragment [module.global.frag]")  
module-keyword ; [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1 Preamble [dcl.pre]")opt

[private-module-fragment:](module.private.frag#nt:private-module-fragment "10.5 Private module fragment [module.private.frag]")  
module-keyword : private ; [*declaration-seq*](dcl.pre#nt:declaration-seq "9.1 Preamble [dcl.pre]")opt
