[antlr-interest] Debugging doesn't work with grammar

Johannes Luber jaluber at gmx.de
Fri Jul 6 14:02:11 PDT 2007


Thomas Brandon wrote:
> On 7/7/07, Johannes Luber <jaluber at gmx.de> wrote:
 > I was able to fix the lexer issue with the grammar you sent me
> off-list by replacing ACTION_STRING_LITERAL with:
> 
> fragment
> ACTION_STRING_LITERAL
>     :    '"' ((ACTION_ESC)=>ACTION_ESC|~'"')* '"'
>     ;
> 
> Note that this does change the matched language, allowing single
> character string literals which the previous version did not. However
> I think this is correct as single character string literals should be
> allowed in actions.

Considering that ANTLR3 accepts the input grammar already you are
probably right.

> This allowed me to lex fine but I got a RewriteEmptyStreamException on
> token rulepart in the element rule.

"rulepart"? I see only "rulename" as an id for "id". Why that should be
able to cause such an exception is beyound me. After all, "rulename" is
guaranteed to be there.

And before I forget it completely - many thanks for your help so far! :)

Best regards,
Johannes Luber



More information about the antlr-interest mailing list