Add project files
This commit is contained in:
commit
ba5971a788
37 files changed
+11180
No files matched your search
@@ -0,0 +1,15 @@
|
||||
parser grammar CalcParser;
|
||||
|
||||
options { tokenVocab = CalcLexer; }
|
||||
|
||||
program : statement* EOF ;
|
||||
|
||||
statement : IDENT ASSIGN expression SEMI ;
|
||||
|
||||
expression
|
||||
: expression (STAR | SLASH) expression
|
||||
| expression (PLUS | MINUS) expression
|
||||
| LPAREN expression RPAREN
|
||||
| NUMBER
|
||||
| IDENT
|
||||
;
|
||||
Reference in new issue
Block a user