diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-03-24 04:52:08 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-03-24 04:52:08 +0000 |
commit | d13d67a31c451ebd78ce708a4ef85803d429f158 (patch) | |
tree | 12228e3c829c72d40ca2e6da8cb7797fcda11e91 /ragel/cdcodegen.cpp | |
parent | eafd7a3974e8605fd02794269db6114a3446e016 (diff) | |
download | ragel-tarball-d13d67a31c451ebd78ce708a4ef85803d429f158.tar.gz |
ragel-6.10HEADragel-6.10master
Diffstat (limited to 'ragel/cdcodegen.cpp')
-rw-r--r-- | ragel/cdcodegen.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ragel/cdcodegen.cpp b/ragel/cdcodegen.cpp index 3d7cafc..96d8501 100644 --- a/ragel/cdcodegen.cpp +++ b/ragel/cdcodegen.cpp @@ -361,6 +361,14 @@ string FsmCodeGen::WIDE_KEY( RedStateAp *state, Key key ) } } +void FsmCodeGen::EOF_CHECK( ostream &ret ) +{ + ret << + " if ( " << P() << " == " << PE() << " )\n" + " goto _test_eof;\n"; + + testEofUsed = true; +} void FsmCodeGen::EXEC( ostream &ret, GenInlineItem *item, int targState, int inFinish ) @@ -656,7 +664,7 @@ void FsmCodeGen::STATE_IDS() out << "\n"; - if ( entryPointNames.length() > 0 ) { + if ( !noEntry && entryPointNames.length() > 0 ) { for ( EntryNameVect::Iter en = entryPointNames; en.lte(); en++ ) { STATIC_VAR( "int", DATA_PREFIX() + "en_" + *en ) << " = " << entryPointIds[en.pos()] << ";\n"; |