Posts by AndreRiossss • 11 points
1 post
-
1
votes0
answers17
viewsQ: Add values to an ANTLR grammar
I have a grammar: grammar SimpleCalc; expr : term ( ( '+' | '-' ) term )* ';' ; term : number ; number : DIGIT+ ; DIGIT : '0'..'9' ; WHITESPACE : ( '\t' | ' ' | '\r' | '\n'| '\u000C' )+ ->…