The book of anltr4 includes this example, in lableledExpr.g4 https://github.com/jszheng/py3antlr4book/blob/master/04-Calc/LabeledExpr.g4
with these lines:
expr: expr op=('*'|'/') expr # MulDiv
| expr op=('+'|'-') expr # AddSub
... ;
but I can't find the documentation which is the objetive, and meaning of op=('*'|'/')
would that be equivalent to?
expr: expr opmult expr # MulDiv
| expr opplus expr # AddSub
... ;
opmult : ('*'|'/') ;
opplus : ('+'|'-') ;