ANTLR-generated file resulting from grammar simple.g Diagnostic output Terence Parr, MageLang Institute with John Lilley, Empathy Software ANTLR Version 2.00b1; 1996,1997 *** Header Action. This action will appear at the top of all generated files. /* empty header */ *** End of Header Action *** Lexer Preamble Action. This action will appear before the declaration of your lexer class: *** End of Lexer Preamble Action *** Your lexer class is called 'SimpleLexer' and is a subclass of 'CharScanner'. *** User-defined lexer class members: These are the member declarations that you defined for your class: *** End of user-defined lexer class members *** String literals used in the parser The following string literals were used in the parser. An actual code generator would arrange to place these literals into a table in the generated lexer, so that actions in the generated lexer could match token text against the literals. String literals used in the lexer are not listed here, as they are incorporated into the mainstream lexer processing. *** End of string literals used by the parser *** Lexer nextToken rule: The lexer nextToken rule is synthesized from all of the user-defined lexer rules. It logically consists of one big alternative block with each user-defined rule being an alternative. Start of an alternative block. The lookahead set for this block is: { '\t', '\n', '\r', ' ', 'A', 'B', 'C', 'D', 'a', 'b', 'c', 'd' } This block has multiple alternatives: Alternate(1) will be taken IF: The lookahead set: { '\t', '\n', '\r', ' ' } is matched. Rule Reference: mWS Otherwise, Alternate(2) will be taken IF: The lookahead set: { 'A', 'a' } is matched. Rule Reference: mA Otherwise, Alternate(3) will be taken IF: The lookahead set: { 'B', 'b' } is matched. Rule Reference: mB Otherwise, Alternate(4) will be taken IF: The lookahead set: { 'C', 'c' } is matched. Rule Reference: mC Otherwise, Alternate(5) will be taken IF: The lookahead set: { 'D', 'd' } is matched. Rule Reference: mD OTHERWISE, a NoViableAlt exception will be thrown End of alternatives End of alternative block. *** End of nextToken lexer rule. *** User-defined Lexer rules: *** Lexer Rule: mWS Access: public Return value: lexical rule returns an implicit token type Start of an alternative block. The lookahead set for this block is: { '\t', '\n', '\r', ' ' } This block has a single alternative Alternate(1) will be taken IF: The lookahead set: { '\t', '\n', '\r', ' ' } is matched. Start of alternative block. Start of an alternative block. The lookahead set for this block is: { '\t', '\n', '\r', ' ' } This block has multiple alternatives: Alternate(1) will be taken IF: The lookahead set: { ' ' } is matched. Match character ' ' Otherwise, Alternate(2) will be taken IF: The lookahead set: { '\t' } is matched. Match character '\t' Otherwise, Alternate(3) will be taken IF: The lookahead set: { '\n' } is matched. Match character '\n' Otherwise, Alternate(4) will be taken IF: The lookahead set: { '\r' } is matched. Match character '\r' OTHERWISE, a NoViableAlt exception will be thrown End of alternatives End of alternative block. ACTION: _ttype = Token.SKIP; OTHERWISE, a NoViableAlt exception will be thrown End of alternative block. *** End Lexer Rule: mWS *** Lexer Rule: mA Access: public Return value: lexical rule returns an implicit token type Start of an alternative block. The lookahead set for this block is: { 'A', 'a' } This block has multiple alternatives: Alternate(1) will be taken IF: The lookahead set: { 'a' } is matched. Match character 'a' Otherwise, Alternate(2) will be taken IF: The lookahead set: { 'A' } is matched. Match character 'A' OTHERWISE, a NoViableAlt exception will be thrown End of alternatives End of alternative block. *** End Lexer Rule: mA *** Lexer Rule: mB Access: public Return value: lexical rule returns an implicit token type Start of an alternative block. The lookahead set for this block is: { 'B', 'b' } This block has multiple alternatives: Alternate(1) will be taken IF: The lookahead set: { 'b' } is matched. Match character 'b' Otherwise, Alternate(2) will be taken IF: The lookahead set: { 'B' } is matched. Match character 'B' OTHERWISE, a NoViableAlt exception will be thrown End of alternatives End of alternative block. *** End Lexer Rule: mB *** Lexer Rule: mC Access: public Return value: lexical rule returns an implicit token type Start of an alternative block. The lookahead set for this block is: { 'C', 'c' } This block has multiple alternatives: Alternate(1) will be taken IF: The lookahead set: { 'c' } is matched. Match character 'c' Otherwise, Alternate(2) will be taken IF: The lookahead set: { 'C' } is matched. Match character 'C' OTHERWISE, a NoViableAlt exception will be thrown End of alternatives End of alternative block. *** End Lexer Rule: mC *** Lexer Rule: mD Access: public Return value: lexical rule returns an implicit token type Start of an alternative block. The lookahead set for this block is: { 'D', 'd' } This block has multiple alternatives: Alternate(1) will be taken IF: The lookahead set: { 'd' } is matched. Match character 'd' Otherwise, Alternate(2) will be taken IF: The lookahead set: { 'D' } is matched. Match character 'D' OTHERWISE, a NoViableAlt exception will be thrown End of alternatives End of alternative block. *** End Lexer Rule: mD *** End User-defined Lexer rules: