If I have a grammar with different alternatives like this one:
statement: 'print' expr | 'let' ID '=' ID ;
How do I find out in the visitor which rule was applied? Is there a possibility to label rules?
Sorry if this is a stupid question, I am pretty new to ANTLR.
Many thanks in advance!