summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2011-11-14 03:41:24 +0000
committerAdrian Thurston <thurston@complang.org>2011-11-14 03:41:24 +0000
commit11d7da8ff5f43daf82bb6baf894d38386fb2527d (patch)
treefb817eae21ab0766308fcc2634922453baac5386
parent3a5813fc842129a73caae72d765346748bb123b6 (diff)
downloadcolm-11d7da8ff5f43daf82bb6baf894d38386fb2527d.tar.gz
Added input and context variables to the preeof block.
-rw-r--r--colm/compile.cc15
-rw-r--r--colm/parsedata.h4
2 files changed, 8 insertions, 11 deletions
diff --git a/colm/compile.cc b/colm/compile.cc
index 292ec194..5a5b6b2f 100644
--- a/colm/compile.cc
+++ b/colm/compile.cc
@@ -2424,7 +2424,7 @@ void ParseData::addMatchText( ObjectDef *frame, LangEl *lel )
frame->insertField( el->name, el );
}
-void ParseData::addInput( ObjectDef *frame, LangEl *lel )
+void ParseData::addInput( ObjectDef *frame )
{
/* Make the type ref. */
TypeRef *typeRef = new TypeRef( InputLoc(), uniqueTypeStream );
@@ -2442,7 +2442,7 @@ void ParseData::addInput( ObjectDef *frame, LangEl *lel )
frame->insertField( el->name, el );
}
-void ParseData::addCtx( ObjectDef *frame, LangEl *lel )
+void ParseData::addCtx( ObjectDef *frame )
{
/* Make the type ref. */
TypeRef *typeRef = new TypeRef( InputLoc(), uniqueTypeStream );
@@ -2700,8 +2700,8 @@ void ParseData::compileTranslateBlock( LangEl *langEl )
/* References to the reduce item. */
addMatchLength( curLocalFrame, langEl );
addMatchText( curLocalFrame, langEl );
- addInput( curLocalFrame, langEl );
- addCtx( curLocalFrame, langEl );
+ addInput( curLocalFrame );
+ addCtx( curLocalFrame );
CodeVect &code = block->codeWV;
@@ -2747,11 +2747,8 @@ void ParseData::compilePreEof( TokenRegion *region )
revertOn = true;
block->frameId = nextFrameId++;
- /* References to the reduce item. */
-// addMatchLength( curLocalFrame, langEl );
-// addMatchText( curLocalFrame, langEl );
-// initFunction( uniqueTypeStr, curLocalFrame, "pull",
-// IN_STREAM_PULL, IN_STREAM_PULL, uniqueTypeStream, uniqueTypeInt, true );
+ addInput( curLocalFrame );
+ addCtx( curLocalFrame );
CodeVect &code = block->codeWV;
diff --git a/colm/parsedata.h b/colm/parsedata.h
index 9a6c9021..af0dc417 100644
--- a/colm/parsedata.h
+++ b/colm/parsedata.h
@@ -754,8 +754,8 @@ struct ParseData
void addMatchText( ObjectDef *frame, LangEl *lel );
void addMatchLength( ObjectDef *frame, LangEl *lel );
- void addInput( ObjectDef *frame, LangEl *lel );
- void addCtx( ObjectDef *frame, LangEl *lel );
+ void addInput( ObjectDef *frame );
+ void addCtx( ObjectDef *frame );
void addTransTokVar( ObjectDef *frame, LangEl *lel );
void addProdRHSVars( ObjectDef *localFrame, ProdElList *prodElList );
void addProdRedObjectVar( ObjectDef *localFrame, LangEl *langEl );