[antlr-interest] please help on lexer rules antlr v3

Hill, Robert rhill03 at eds.com
Thu Sep 28 23:45:01 PDT 2006


On a related note to John's Q, I've had a similar problem.
When I specify in the parser options to import the lexer's tokens,
If I mis-spell one of them in the Parser there's no warnings.

Is there a need for a warning here, when you're importing tokens
shouldn't they all be imported, any in the parser that aren't recognised
issuing a warning? 
I can see the flexibility point of view, where you can define tokens in
both Lexer and parser, and I suppose that it doesn't take long to find
the bug when the parser doesn't recognise what you think it should. 

It would be handy to have it bring that to your attention I think...

Cheers!

Rob


--
Rob Hill
EDS - Hallamshire Business Park
F1E/045
Sheffield	
T:	+44 (0) 114 291 1928
M:	+44 (0) 791 732 1227
E:	rhill03 at eds.com

 
[snip]

>
>
>Question for Dr. Parr - shouldn't Antlr disallow parser 
>references to lexer fragments?
>
>
>
>Hope this helps...
>   -jbb
>


More information about the antlr-interest mailing list