diff options
author | Adrian Thurston <thurston@complang.org> | 2009-03-08 17:53:43 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2009-03-08 17:53:43 +0000 |
commit | 53e4b243f1fd2fc2a5a1838a2a7da63c1a1d9032 (patch) | |
tree | a3a5838d374fee68ed37250015e8c3bd555b74eb | |
parent | 510380a31d6a5114753709ec0f6e90fc8ee85921 (diff) | |
download | colm-53e4b243f1fd2fc2a5a1838a2a7da63c1a1d9032.tar.gz |
Log the token region in FsmRun::scanToken.
-rw-r--r-- | colm/fsmrun.cpp | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/colm/fsmrun.cpp b/colm/fsmrun.cpp index f5968585..c9402645 100644 --- a/colm/fsmrun.cpp +++ b/colm/fsmrun.cpp @@ -585,13 +585,6 @@ void send_handle_error( FsmRun *fsmRun, PdaRun *parser, Kid *input ) parser->stopParsing = true; } } - - #ifdef COLM_LOG_PARSE - if ( colm_log_parse ) { - cerr << "new token region: " << - parser->tables->rtd->regionInfo[fsmRun->region].name << endl; - } - #endif } void PdaRun::ignore( Tree *tree ) @@ -808,12 +801,6 @@ void scanner_error( FsmRun *fsmRun, PdaRun *parser ) parser->sendBackIgnore(); parser->nextRegionInd += 1; - #ifdef COLM_LOG_PARSE - if ( colm_log_parse ) { - cerr << "new token region: " << - parser->tables->rtd->regionInfo[fsmRun->region].name << endl; - } - #endif return; } @@ -833,12 +820,6 @@ void scanner_error( FsmRun *fsmRun, PdaRun *parser ) cerr << "PARSE ERROR" << endp; } else { - #ifdef COLM_LOG_PARSE - if ( colm_log_parse ) { - cerr << "new token region: " << - parser->tables->rtd->regionInfo[fsmRun->region].name << endl; - } - #endif return; } } @@ -909,6 +890,13 @@ long FsmRun::scanToken( PdaRun *parser ) region = parser->getNextRegion(); cs = tables->entryByRegion[region]; + #ifdef COLM_LOG_PARSE + if ( colm_log_parse ) { + cerr << "scanning using token region: " << + parser->tables->rtd->regionInfo[fsmRun->region].name << endl; + } + #endif + /* Clear the mark array. */ memset( mark, 0, sizeof(mark) ); |