Appendix C: Common Syntax Elements

export‑module‑declaration export module module‑name ;
imports import*
import import‑prefix? import module‑name
import‑prefix interface‑prefix | implementation‑prefix
interface‑prefix [ interface ]
implementation‑prefix [ implementation ]
module‑name qualified‑id
file‑path <[^\n>]*>
qualified‑id identifier (. identifier)*
identifier Unicode identifier
string‑literal " (schar | escape)* "
schar [^\"\\\n\r]
char‑literal ' (cchar | escape)+ '
cchar [^'\\\n\r]
escape \
( (x|X) hex‑digit+ |
(d|D) digit+ |
octal‑digit+ |
uhex4 |
Uhex8 |
(a|b|f|n|r|t|v|.))
integer‑literal octal‑literal | decimal‑literal | hex‑literal
floating‑literal fraction exponent? | digit+ exponent
fraction digit* . digit+ | digit+ .
exponent (e | E) sign? digit+
sign + | -
decimal‑literal [1-9] digit*
digit‑sequence digit+
digit [0-9]
hex‑literal (0x|0X) hex‑digit+
hex8 hex4 hex4
hex4 hex‑digit hex‑digit hex‑digit hex‑digit
hex‑digit [0-9a-fA-F]
octal‑literal 0 octal‑digit*
octal‑digit [0-7]