Some language stuff
This commit is contained in:
7
tests/maths.grammar
Normal file
7
tests/maths.grammar
Normal file
@@ -0,0 +1,7 @@
|
||||
expression : <product> (('+' | '-') <product>)*;
|
||||
|
||||
product : <value> (('*' | '/') <value>)*;
|
||||
|
||||
value : /[0-9]+/ | '(' <expression> ')';
|
||||
|
||||
maths : /^\\w*/ <expression> /\\w*$/;
|
Reference in New Issue
Block a user