[antlr-interest] dfa-based lexers versus top-down antlr lexers

Greg Lindholm glindholm at yahoo.com
Thu May 1 08:20:43 PDT 2003


Cool, this wasn't available when I needed it but I'll check it out next
time.

Does this mean that this predicate gets "hoisted" for testing before
entering the rule?

The related issue with positional tokens is often the rule is "anything
in columns x thru y",  the "anything" part causes ambiguous-ness
errors.  Will this {getColumn()==1}? predidate help with this?


--- Terence Parr <parrt at jguru.com> wrote:
> 
> On Wednesday, April 30, 2003, at 07:05  AM, Greg Lindholm wrote:
> 
> > I've done a couple projects using ANTLR and have not yet
> > been able to use the lexer.  I've had to hand-craft my own
> > lexer's because of column positional token's issues.
> 
> Hi :)
> 
> 2.7.2 allows predicates on the left edge of lexer rules so you can
> say:
> 
> {getColumn()==1}?
> 
> and have it work :)


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

 

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




More information about the antlr-interest mailing list