diff options
author | Adrian Thurston <thurston@complang.org> | 2012-05-13 13:00:39 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-05-13 13:00:39 -0400 |
commit | 176e0427ef20e3cf0994587b0639ae94e99af0dc (patch) | |
tree | 49eae3191f1bf6b333c88fad5eebde1ae2fc9294 /colm/pdagraph.cc | |
parent | 41e60dfc09b1825d4f9be893e913b0b85672e34f (diff) | |
download | colm-176e0427ef20e3cf0994587b0639ae94e99af0dc.tar.gz |
Only advance reductions where we need to for parse_stop.
Diffstat (limited to 'colm/pdagraph.cc')
-rw-r--r-- | colm/pdagraph.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/colm/pdagraph.cc b/colm/pdagraph.cc index 5f0e272c..191b7581 100644 --- a/colm/pdagraph.cc +++ b/colm/pdagraph.cc @@ -50,11 +50,13 @@ PdaState::PdaState() onClosureQueue(false), inClosedMap(false), - followMarked(false) + followMarked(false), + + advanceReductions(false) { } -/* Copy everything except actual the transitions. That is left up to the +/* Copy everything except the action transitions. That is left up to the * PdaGraph copy constructor. */ PdaState::PdaState(const PdaState &other) : @@ -424,9 +426,13 @@ void PdaGraph::addInTrans( PdaTrans *destTrans, PdaTrans *srcTrans ) /* Add in the commit points. */ destTrans->commits.insert( srcTrans->commits ); + + if ( srcTrans->toState->advanceReductions ) + destTrans->toState->advanceReductions = true; } } +/* NO LONGER USED. */ void PdaGraph::addInState( PdaState *destState, PdaState *srcState ) { /* Draw in any properties of srcState into destState. */ |