Lexikális elemek
A nevek betűvel kezdődnek, és betűkből, vagy számokból állnak:
name ::= letter {letter | digit} [id_cont]
| “_” {“_”} op_name the first underscore is not part of the msg name
op_name ::= punct {punct} [id_cont]
| “_” {“_”} name the first underscore is not part of the msg name
A beépített számtípusokhoz tartozó literálok szintaxisa:
integer ::= [radix] hex_digits
a leading “-” is considered a unary operator
radix ::= digits “_”
hex_digits ::= hex_digit {hex_digit}
hex_digit ::= digit | one of “a..fA..F”
float ::= integer “.” hex_digits [exponent]
| integer exponent
exponent ::= “^” [ “+“ | “-“] digits
digits ::= digit {digit}
A szöveges literálok szintaxisa:
character ::= “ ' ” char “ ' “
string ::= “ " “ { char | line_break } “ " “
char ::= any | “ \ “ escape_char
escape_char ::= one of “ abfnrtv'"\?0 “
| [“o“| “d” ] digit [digit [digit]]
| [“o”] digit [digit [digit]]
| “x“ hex_digit [hex_digit]
line_break ::= “\” {whitespace} new_line {whitespace} “\”
nbsp; characters between \' s are not part of the string
brace_balanced_chars ::= {any but “{“ }
[ { brace_balanced_chars } {any but “}” }]
letter ::= one of “a..zA..Z”
digit ::= one of “0..9”
punct ::= one of “!#$%^&*-+=<>/?~\|”
White space-ek szintaxisa:
whitespace ::= space | tab | newline | comment
comment ::= “--” {any but newline} newline
| “(--” {any} “--)”;
comment to end of line racketed comment; an be nested