summaryrefslogtreecommitdiff
path: root/impl/EquationSystem.g
diff options
context:
space:
mode:
Diffstat (limited to 'impl/EquationSystem.g')
-rw-r--r--impl/EquationSystem.g10
1 files changed, 4 insertions, 6 deletions
diff --git a/impl/EquationSystem.g b/impl/EquationSystem.g
index 6b721bb..3a6598a 100644
--- a/impl/EquationSystem.g
+++ b/impl/EquationSystem.g
@@ -11,7 +11,6 @@ tokens {
SUB = '-' ;
MULT = '*' ;
COMMA = ';' ;
- RANGE = 'range' ;
GUARD = 'guard' ;
GREATER_EQUAL = '>=' ;
QUESTION_MARK = '?' ;
@@ -27,15 +26,14 @@ maxExpr : MAXIMUM^ '('! minExpr ( ','! minExpr )* ')'! | minExpr ;
minExpr : MINIMUM^ '('! maxExpr ( ','! maxExpr )* ')'! | expr ;
expr : '(' expr GREATER_EQUAL expr QUESTION_MARK expr ')' -> ^(GUARD expr expr expr)
- | term ( (PLUS | MULT | COMMA)^ expr )* ;
+ | term ( (PLUS | MULT | SUB | COMMA)^ expr )* ;
-term : '[' NUMBER ',' NUMBER ']' -> ^( RANGE NUMBER NUMBER )
+term : NUMBER
| VARIABLE
- | '('! expr ')'!
- | SUB^ term ;
+ | '('! expr ')'! ;
-NUMBER : (SUB) (DIGIT)+ | (DIGIT)+ ;
+NUMBER : (DIGIT)+ ;
VARIABLE: (LETTER) (LETTER | DIGIT)* ;
WHITESPACE : ( '\t' | ' ' | '\u000C' )+
{