[antlr-interest] NullPointer exception and inline template

Gabriel Miro gsmiro at gmail.com
Fri Sep 23 04:31:57 PDT 2011


Eric,

thinking about it yesterday I came to the same conclusion. Multi-tasking has
this strange effect on me and I didn't realize that I was trying to use
templates in a lexer rule until I was in bed.

Thanks anyway for the input and patience.

Regards,
Gabriel Miró

On Thu, Sep 22, 2011 at 8:34 PM, The Researcher <researcher0x00 at gmail.com>wrote:

>
>
> 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