[antlr-interest] Lexer rules with params

Alex Shneyderman a.shneyderman at gmail.com
Fri Feb 15 01:50:27 PST 2008


I have lexer rule like this :

NewLine[boolean significantWhiteSpace]
    : ('\r\n' | '\r' | '\n') { if (!significantWhiteSpace) {$channel=HIDDEN;} }
    ;

antlr generates Lexer that is invalid in method mTokens the case stmt
is missing parmater:

case 100 :
                {
                mNewLine();
                }
                break;

Parameters are not allowed to non-fragment lexer rules ? Or this is a bug ?


More information about the antlr-interest mailing list