Created
March 3, 2015 10:01
-
-
Save madfriend/f0adff1d6d681baf9a75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start: program; | |
program: outer_block*; | |
outer_block: (outer_line NEWLINE)* | |
outer_line?; | |
@outer_line: initialization | |
| assignment | |
';'; | |
assignment: name '=' | |
('\-' digits | |
| value); | |
initialization: global? type assignment | |
(',' assignment)*; | |
global: 'global'; | |
type: 'int' | 'bool'; | |
value: digits | 'true' | 'false'; | |
digits: '\d+'; | |
name: '(?i)[\w_]+'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment