[antlr-interest] got rule memoization working :)

Terence Parr parrt at cs.usfca.edu
Sun Dec 4 11:47:41 PST 2005


Ok, took me a few hours to get this exactly right, but much of it was  
figuring out how to build the cache...John Mitchell and I kinda came  
to a conclusion by phone but I didn't implement it.  For now, my  
cache keeps all info around and it could get big; I'll fix later.   
You can turn it off with option

   -nomemo        when backtracking don't generate memoization code

Anyway, this would be really easy to implement manually (if  
tediously) for v2.  This should give you all the info you need to  
know to implement:

http://www.antlr.org/blog/antlr3/lookahead.tml

Enjoy...I must say that this is all pretty slick. :)

I'll push to the depot soon...I'll release 3.0ea7 this week I hope.

Ter


More information about the antlr-interest mailing list