diff options
author | Adrian Thurston <thurston@complang.org> | 2012-05-28 20:20:48 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-05-28 20:20:48 -0400 |
commit | 8355e537e797b60608a00a323dd85e2d67ebba13 (patch) | |
tree | 6ff91ffe77375727d2d362ad03ba975a85520629 /colm/parsetree.cc | |
parent | abdec3f192cd435854bbcf9eb51eab2189a9622d (diff) | |
download | colm-8355e537e797b60608a00a323dd85e2d67ebba13.tar.gz |
don't need labels in the regular language tree
Diffstat (limited to 'colm/parsetree.cc')
-rw-r--r-- | colm/parsetree.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/colm/parsetree.cc b/colm/parsetree.cc index 64f8178a..14e070a9 100644 --- a/colm/parsetree.cc +++ b/colm/parsetree.cc @@ -1147,9 +1147,6 @@ void FactorWithAug::assignConditions( FsmGraph *graph ) /* Evaluate a factor with augmentation node. */ FsmGraph *FactorWithAug::walk( Compiler *pd ) { - /* Enter into the scopes created for the labels. */ - NameFrame nameFrame = pd->enterNameScope( false, labels.length() ); - /* Make the array of function orderings. */ int *actionOrd = 0; if ( actions.length() > 0 ) @@ -1224,26 +1221,6 @@ FsmGraph *FactorWithAug::walk( Compiler *pd ) } } - /* Set entry points for labels. */ - if ( labels.length() > 0 ) { - /* Pop the names. */ - pd->resetNameScope( nameFrame ); - - /* Make labels that are referenced into entry points. */ - for ( int i = 0; i < labels.length(); i++ ) { - pd->enterNameScope( false, 1 ); - - /* Will always be found. */ - NameInst *name = pd->curNameInst; - - /* If the name is referenced then set the entry point. */ - if ( name->numRefs > 0 ) - rtnVal->setEntry( name->id, rtnVal->startState ); - } - - pd->popNameScope( nameFrame ); - } - if ( priorOrd != 0 ) delete[] priorOrd; if ( actionOrd != 0 ) @@ -1253,13 +1230,7 @@ FsmGraph *FactorWithAug::walk( Compiler *pd ) void FactorWithAug::makeNameTree( Compiler *pd ) { - /* Add the labels to the tree of instantiated names. Each label - * makes a new scope. */ NameInst *prevNameInst = pd->curNameInst; - for ( int i = 0; i < labels.length(); i++ ) - pd->curNameInst = pd->addNameInst( labels[i].loc, labels[i].data, true ); - - /* Recurse, then pop the names. */ factorWithRep->makeNameTree( pd ); pd->curNameInst = prevNameInst; } |