summaryrefslogtreecommitdiff
path: root/colm/pdarun.c
diff options
context:
space:
mode:
Diffstat (limited to 'colm/pdarun.c')
-rw-r--r--colm/pdarun.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/colm/pdarun.c b/colm/pdarun.c
index 5bd0553a..68fae8d9 100644
--- a/colm/pdarun.c
+++ b/colm/pdarun.c
@@ -280,8 +280,10 @@ void detachSource( FsmRun *fsmRun, StreamImpl *is )
void clearBuffered( FsmRun *fsmRun )
{
if ( fsmRun->tokstart != 0 ) {
- fsmRun->p = fsmRun->pe = fsmRun->tokstart;
- fsmRun->tokstart = 0;
+ //fsmRun->p = fsmRun->pe = fsmRun->tokstart;
+ //fsmRun->tokstart = 0;
+
+ fsmRun->pe = fsmRun->p;
}
else {
fsmRun->pe = fsmRun->p;
@@ -1116,6 +1118,15 @@ long scanToken( Program *prg, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is )
fsmRun->pe = fsmRun->p + len;
break;
+ case INPUT_EOS:
+ if ( fsmRun->tokstart != 0 )
+ fsmRun->peof = fsmRun->pe;
+ debug( REALM_SCAN, "EOS *******************\n" );
+// else {
+// return SCAN_EOS;
+// }
+ break;
+
case INPUT_EOF:
if ( fsmRun->tokstart != 0 )
fsmRun->peof = fsmRun->pe;