summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-05-28 20:20:48 -0400
committerAdrian Thurston <thurston@complang.org>2012-05-28 20:20:48 -0400
commit8355e537e797b60608a00a323dd85e2d67ebba13 (patch)
tree6ff91ffe77375727d2d362ad03ba975a85520629
parentabdec3f192cd435854bbcf9eb51eab2189a9622d (diff)
downloadcolm-8355e537e797b60608a00a323dd85e2d67ebba13.tar.gz
don't need labels in the regular language tree
-rw-r--r--colm/parsetree.cc29
-rw-r--r--colm/parsetree.h1
2 files changed, 0 insertions, 30 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;
}
diff --git a/colm/parsetree.h b/colm/parsetree.h
index f6edbc35..c3a75df5 100644
--- a/colm/parsetree.h
+++ b/colm/parsetree.h
@@ -902,7 +902,6 @@ struct FactorWithAug
Vector<ParserAction> actions;
Vector<PriorityAug> priorityAugs;
PriorDesc *priorDescs;
- Vector<Label> labels;
Vector<EpsilonLink> epsilonLinks;
Vector<ParserAction> conditions;