[antlr-interest] Re: Building hierarchical grammars
John D. Mitchell
johnm-antlr at non.net
Sun Mar 28 15:00:58 PST 2004
>>>>> "Mike" == Mike Lischke <lists at lischke-online.de> writes:
[...]
> However, building things up hierarchically works great with ANTLR. But
> maybe only when build the hierarchy up with protected tokens?
Exactly.
>> Lexers, on the other hand, have to pick from among ALL the Lexer rules
>> each and every time they are asked for the next token. They don't
>> 'know' where they are called from in the parser, and so can't restrict
>> the set of token parses for a particular case.
> Thanks for pointing this out. This is an important point IMO, also when
> it comes to performance. And it explains a lot.
So, using the "protected" qualifier effectively hides those
sub-rules/-hierarchies.
Have fun,
John
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list