[antlr-interest] Retaining comments

Darien Hager darien.hager at etelos-inc.com
Wed Feb 27 13:27:29 PST 2008


On 2/27/08, Gavin Lambert <antlr at mirality.co.nz> wrote:
>
> At 06:06 28/02/2008, Blake Meike wrote:
>   >Unfortunately, every call to the lexer action is called
>   >before any call to any parser action, as if the entire
>   >source file were converted to tokens, before any token
>   >is fed to the parser.
>
>
> Because that's exactly what does happen.
>
>
I originally had this same kind of assumption in my ongoing experience as a
newbie user. The combined grammar originally gave me a sort of mental model
that lexer rules were a special subset of parser rules, special because they
were the leafy tree endpoints that were actually checked against the raw
data as a given rule was invoked.

-- 
Darien Hager
Developer
Etelos, Inc.
darien at etelos.com

http://www.etelos.com
"Revolutionizing the way applications are developed, distributed and
consumed."

This e-mail message, including attachments, may contain confidential
information for the sole use of the intended recipient(s). If you are not
the intended recipient, then this is notice that any use, disclosure,
dissemination, distribution or copying is strictly prohibited. If you have
received this message in error please contact the sender by reply mail and
destroy all copies of the original message.


This e-mail message, including attachments, may contain confidential information for the sole use of the intended recipient(s). If you are not the intended recipient, then this is notice that any use, disclosure, dissemination, distribution or copying is strictly prohibited.  If you have received this message in error please contact the sender by reply mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080227/737050d8/attachment.html 


More information about the antlr-interest mailing list