antlr parser

This commit is contained in:
2024-08-11 15:01:18 +02:00
parent 154e9597ae
commit b79b00e2d9
11 changed files with 104 additions and 232 deletions
+11
View File
@@ -0,0 +1,11 @@
grammar Wyst;
WS : [ \t\r\n]+ -> skip;
expr: expr ('*'|'/') expr
| expr ('+'|'-') expr
| INT
| '(' expr ')'
;
INT: [0-9]+;