[antlr-interest] problems getting a simple grammar to accept it's input

Bart Kiers bkiers at gmail.com
Thu Mar 24 08:26:44 PDT 2011


On Thu, Mar 24, 2011 at 4:08 PM, Florian Franzmann <
siflfran at hawo.stw.uni-erlangen.de> wrote:

> ...
> As I understand it the parser consumes 'Model' as IDENTIFIER and goes into
> state block. It ignores a WS, then finds a '{'. This should be recognized
> as
> BLOCK_BEGIN, which is the next token expected in block---any idea what I'm
> doing wrong?
>
> best regards
> Florian Franzmann
>
>
Fragment rules can only be "seen" by other lexer rules. There will never be
a token `BLOCK_BEGIN ` created, so it can't be used inside parser rules.

Regards,

Bart.


More information about the antlr-interest mailing list