From 11d7da8ff5f43daf82bb6baf894d38386fb2527d Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Mon, 14 Nov 2011 03:41:24 +0000 Subject: Added input and context variables to the preeof block. --- colm/compile.cc | 15 ++++++--------- colm/parsedata.h | 4 ++-- 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 ); -- cgit v1.2.1