[antlr-interest] v4 lexers

Terence Parr parrt at cs.usfca.edu
Sat Feb 20 11:39:22 PST 2010

Hi Kyle, thanks for your thoughts!
On Feb 17, 2010, at 9:14 PM, kferrio at gmail.com wrote:

> Regarding the wiki page by the same subject... I'm clearly no expert in the implementation guts but moving software stack seems like it could have a couple more benefits in addition to the ones you wrote about.  The improved "separation of concerns" would make it easier (at least for me!) to follow and debug the resulting target code.  Also it might accelerate the development (and maintenance) of non-Java-like targets.  

Agreed. it really makes more sense for me to manage my own stack of attributes.

> Also I hope Gavin Lambert's suggestion for "negative context" via exclusionary predicates makes it into v4. 

It's definitely useful occasionally.  ~ doesn't really work for negation because it means match something not in that set. ! means don't include but match. We need another operator I guess; some kind of variant of the syntactic predicate could make sense.

> True, the hybrid approach is the key architectural gem which will make v4 even more powerful for "edgy" grammars.    But the separate stack will potentially benefit *every* grammar.   And exclusionary predicates will afford simple expression to certain simple grammars which I suspect may actually be more common than listserv traffic would suggest.  
> Anyway thanks for the glimpse into the future.   I look forward to learning v4 all over from the beginning!

I'm hoping that users won't notice the difference, at least in the first version ;)

More information about the antlr-interest mailing list