Commit 09cf4838 authored by Sarah Grebing's avatar Sarah Grebing

Parser-Erweiterung substitution

parent 11f21a84
...@@ -47,6 +47,7 @@ expression ...@@ -47,6 +47,7 @@ expression
: :
MINUS expression #exprNegate MINUS expression #exprNegate
| NOT expression #exprNot | NOT expression #exprNot
| expression '[' substExpressionList ']' #exprSubst
| expression MUL expression #exprMultiplication | expression MUL expression #exprMultiplication
| <assoc=right> expression DIV expression #exprDivision | <assoc=right> expression DIV expression #exprDivision
| expression op=(PLUS|MINUS) expression #exprLineOperators | expression op=(PLUS|MINUS) expression #exprLineOperators
...@@ -61,6 +62,12 @@ expression ...@@ -61,6 +62,12 @@ expression
| matchPattern #exprMatch | matchPattern #exprMatch
; ;
substExpressionList
:
scriptVar '/' expression (',' substExpressionList)*
;
literals : literals :
ID #literalID ID #literalID
| DIGITS #literalDigits | DIGITS #literalDigits
...@@ -165,6 +172,7 @@ DEDENT : '}' ; ...@@ -165,6 +172,7 @@ DEDENT : '}' ;
SEMICOLON : ';' ; SEMICOLON : ';' ;
COLON : ':' ; COLON : ':' ;
STRING_LITERAL STRING_LITERAL
: '\'' ('\'\'' | ~ ('\''))* '\'' : '\'' ('\'\'' | ~ ('\''))* '\''
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment