Tutorial by Examples

Labeling the alternatives inside a rule starting with the # operator tells ANTLR to generate listener methods for each label corresponding to the alternative. By specifying a label for each alternative in the following rule: // Rule type : int #typeInt | short #typeShort | long ...

Page 1 of 1