[antlr-interest] executing actions during backtrack

Terence Parr parrt at cs.usfca.edu
Tue May 9 14:24:20 PDT 2006


On May 9, 2006, at 1:59 PM, Oliver Zeigermann wrote:

> I guess you need something like an inverse action that applies when
> backtracking fails. So you might need a pair of actions. This way all
> actions executed inside backtracking are undone when backtracking is
> done. Maybe it is enough to add an inverse action to indicate it
> should be executed inside backtracking?

Hi :)  Yep, thought about that and decided it's probably very hard to  
always do an undo.  That said, for symbol tables it might be doable.   
Might have to track stuff in a data structure to manage the undos.   
What if we did "software transaction" like stuff to auto-rewind?

Ter



More information about the antlr-interest mailing list