lexer‑file | → | declaration* |
declaration | → | class‑map | usings | tokens | keywords | expressions | lexer |
class‑map | → | classmap id ; |
usings | → | using‑directives |
using‑directives | → | using‑directive+ |
using‑directive | → | using‑alias‑directive | using‑namespace‑directive |
using‑alias‑directive | → | using identifier = qualified‑id ; |
using‑namespace‑directive | → | using qualified‑id ; |
tokens | → | tokens id { (token % ,)? } |
token | → | ( id , string ) |
keywords | → | keywords id { (keyword % ,)? } |
keyword | → | ( string , id ) |
expressions | → | expressions { expression* } |
expression | → | id = expr‑string ; |
expr‑string | → | string |
lexer | → | lexer id { (lexer‑clause)* } |
lexer‑clause | → | expr‑string action compound‑statement | variables | actions |
variables | → | variables { variable* } |
variable | → | type‑expr id ; |
actions | → | actions { action = compound‑statement* } |
action | → | $ ( integer ) | <empty> |