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

Florian Franzmann siflfran at hawo.stw.uni-erlangen.de
Thu Mar 24 08:39:11 PDT 2011


On Thu 2011-03-24 16:26:44 +0100, Bart Kiers wrote:
>    On Thu, Mar 24, 2011 at 4:08 PM, Florian Franzmann
>    <[1]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.
Thanks, that did it.


More information about the antlr-interest mailing list