[antlr-interest] NullPointer exception and inline template

The Researcher researcher0x00 at gmail.com
Thu Sep 22 16:34:11 PDT 2011


On Thu, Sep 22, 2011 at 3:46 PM, Gabriel Miro <gsmiro at gmail.com> wrote:

> COMP_OP    :     '<>' -> template() "!="
>        | '<='
>        | '<'
>        | '>='
>        | '>'
>        ;
>

 String templates are not my strong suit and I could not verify this in the
book on on the web site, so there is a chance this might be wrong.

COMP_OP is a lexer rule and lexer rules don't support string templates.
Think about what a lexer and parser do and it should be more apparent.

Eric


More information about the antlr-interest mailing list