parrotcode: a grammar for testing lexico | |
Contents | Language Implementations | Lua |
src/lua51_testlex.pg - a grammar for testing lexico
This grammar allows to test the lexico part of Lua::Grammar.
So, it just defines some top rules, the rules that we want to test are imported from the whole Lua grammar.
TOP ::= {token} token ::= Name | keyword | String | Number | punctuator keyword ::= 'and' | 'break' | 'do' | 'elseif' | 'else' | 'end' | 'false' | 'for' | 'function' | 'if' | 'in' | 'local' | 'nil' | 'not' | 'or' | 'repeat' | 'return' | 'then' | 'true' | 'until' | 'while' punctuator ::= '+' | '-' | '#' | '*' | '/' | '%' | '^' | '...' | '..' | '.' | '<=' | '<' | '>=' | '>' | '==' | '~=' | '=' | ',' | ';' | ':' | '(' | ')' | '{' | '}' | '[' | ']'
Used by languages/lua/test_lex.pir.
|