Dear Jim,

I followed your recommendations, avoided the "I don't want delimiters in my
language" temptation, and created the grammar from scratch using ANTLRWorks
successfully.
Next steps for me: AST + StringTemplate output.

Thanks a lot for your answer. It was exactly what I needed.

Sincerely,
Arye.

Remove your tokens section and place those keywords as real lexer rules that
> are listed before the ID rule.
> Remove any 'literals' in your parser and make these real lexer rules and
> tokens.
> Change your ANY rule to just: ANY :. { issue error message; skip(); };
> Use {skip();} rather than HIDDEN unless you need the whitespace later for
> some reason;
>
> Then you have to look at where you are putting your NEWLINEs in the
> grammar.
> It looks like you have too many specified and are expecting NEWLINE NEWLINE
> at some point. You should try skipping newlines and see how ambiguous your
> grammar is. If this is your own language, don't fall for the "I don't want
> delimiters in my language" myth as it makes giving out informative error
> messages nigh on impossible.
>
> But more than all this, you need to run your grammar in the ANTLR works
> debugger, which will allow you to trace out what is wrong with your grammar
> specification.
>
> Jim
>

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to