[antlr-interest] grammar question

Terence Parr parrt at jguru.com
Sun Mar 23 15:42:15 PST 2003


On Sunday, March 23, 2003, at 03:10  PM, mark kant wrote:

> I checked the example - it does the lexer selection
> based in lex only.  Is there another way to activate a
> set of lex rules based on a rule match in parser, but
> under normal  conditions, these lex rules are inactive
> ?
>

Technically yes via a semantic predicate on left edge of lexer rule 
(new 2.7.2 feature), but it's generally bad to have parser feed info 
back to lexer for lookahead reasons.

Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list