ctbrec-5.3.2-experimental/common/src/main/antlr4/ctbrec/variableexpansion/antlr/PostProcessing.g4

22 lines
356 B
ANTLR

grammar PostProcessing;
line: (text | variable | functionCall)* EOF;
functionCall: '$' identifier '(' (expression (',' expression)*)? ')';
text: CH+?;
identifier: CH+?;
parameter: text;
variable: '${' identifier ('(' parameter ')')? ('?' expression)? '}';
expression
: text
| variable
| functionCall
;
CH: .;
WS: [ \t\r\n]+ -> skip;