Removed the write eof command.
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Mon, 24 Sep 2007 21:05:15 +0000 (21:05 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Mon, 24 Sep 2007 21:05:15 +0000 (21:05 +0000)
git-svn-id: http://svn.complang.org/ragel/trunk@288 052ea7fc-9027-0410-9066-f65837a77df0

64 files changed:
redfsm/gendata.cpp
redfsm/gendata.h
rlgen-cd/fflatcodegen.cpp
rlgen-cd/fflatcodegen.h
rlgen-cd/fgotocodegen.cpp
rlgen-cd/fgotocodegen.h
rlgen-cd/flatcodegen.cpp
rlgen-cd/flatcodegen.h
rlgen-cd/ftabcodegen.cpp
rlgen-cd/ftabcodegen.h
rlgen-cd/gotocodegen.cpp
rlgen-cd/gotocodegen.h
rlgen-cd/ipgotocodegen.cpp
rlgen-cd/ipgotocodegen.h
rlgen-cd/tabcodegen.cpp
rlgen-cd/tabcodegen.h
rlgen-java/javacodegen.cpp
rlgen-java/javacodegen.h
rlgen-ruby/ruby-fflatcodegen.cpp
rlgen-ruby/ruby-fflatcodegen.h
rlgen-ruby/ruby-flatcodegen.cpp
rlgen-ruby/ruby-flatcodegen.h
rlgen-ruby/ruby-ftabcodegen.cpp
rlgen-ruby/ruby-ftabcodegen.h
rlgen-ruby/ruby-tabcodegen.cpp
rlgen-ruby/ruby-tabcodegen.h
test/atoi3.rl
test/awkemu.rl
test/call1.rl
test/call2.rl
test/call3.rl
test/clang1.rl
test/clang2.rl
test/clang3.rl
test/cppscan1.rl
test/cppscan2.rl
test/cppscan3.rl
test/cppscan4.rl
test/cppscan5.rl
test/erract1.rl
test/erract5.rl
test/erract6.rl
test/export3.rl
test/forder1.rl
test/forder2.rl
test/forder3.rl
test/high1.rl
test/high2.rl
test/high3.rl
test/keller1.rl
test/lmgoto.rl
test/minimize1.rl
test/range.rl
test/recdescent1.rl
test/recdescent2.rl
test/recdescent3.rl
test/repetition.rl
test/ruby1.rl
test/statechart1.rl
test/strings1.rl
test/strings2.rl
test/tokstart1.rl
test/union.rl
test/xml.rl

index 0123564..d503261 100644 (file)
@@ -695,13 +695,6 @@ void CodeGenData::writeStatement( InputLoc &loc, int nargs, char **args )
                }
                writeExec();
        }
-       else if ( strcmp( args[0], "eof" ) == 0 ) {
-               for ( int i = 1; i < nargs; i++ ) {
-                       source_warning(loc) << "unrecognized write option \"" << 
-                                       args[i] << "\"" << endl;
-               }
-               writeEOF();
-       }
        else if ( strcmp( args[0], "exports" ) == 0 ) {
                for ( int i = 1; i < nargs; i++ ) {
                        source_warning(loc) << "unrecognized write option \"" << 
index ebd8d95..4e8f527 100644 (file)
@@ -68,7 +68,6 @@ struct CodeGenData
        virtual void writeData() {};
        virtual void writeInit() {};
        virtual void writeExec() {};
-       virtual void writeEOF() {};
        virtual void writeExports() {};
 
        /* This can also be overwridden to modify the processing of write
index 915dc8d..0e6f041 100644 (file)
@@ -358,7 +358,3 @@ void FFlatCodeGen::writeExec()
 
        out << "        }\n";
 }
-
-void FFlatCodeGen::writeEOF()
-{
-}
index cf92fd9..7493b50 100644 (file)
@@ -49,7 +49,6 @@ protected:
        virtual std::ostream &TRANS_ACTION( RedTransAp *trans );
 
        virtual void writeData();
-       virtual void writeEOF();
        virtual void writeExec();
 };
 
index 31aa5d2..b3b497b 100644 (file)
@@ -275,7 +275,3 @@ void FGotoCodeGen::writeExec()
 
        out << "        }\n";
 }
-
-void FGotoCodeGen::writeEOF()
-{
-}
index 076f5c4..9a93d5d 100644 (file)
@@ -49,7 +49,6 @@ public:
        unsigned int EOF_ACTION( RedStateAp *state );
 
        virtual void writeData();
-       virtual void writeEOF();
        virtual void writeExec();
 };
 
index ad52279..7be6097 100644 (file)
@@ -797,7 +797,3 @@ void FlatCodeGen::writeExec()
 
        out << "        }\n";
 }
-
-void FlatCodeGen::writeEOF()
-{
-}
index 27dee2e..4497b24 100644 (file)
@@ -81,7 +81,6 @@ protected:
        virtual std::ostream &TRANS_ACTION( RedTransAp *trans );
 
        virtual void writeData();
-       virtual void writeEOF();
        virtual void writeExec();
 };
 
index d8e1ba8..ed49cd7 100644 (file)
@@ -410,8 +410,3 @@ void FTabCodeGen::writeExec()
 
        out << "        }\n";
 }
-
-
-void FTabCodeGen::writeEOF()
-{
-}
index 9d26d1c..9a91174 100644 (file)
@@ -49,7 +49,6 @@ protected:
        virtual std::ostream &EOF_ACTION( RedStateAp *state );
        virtual std::ostream &TRANS_ACTION( RedTransAp *trans );
        virtual void writeData();
-       virtual void writeEOF();
        virtual void writeExec();
        virtual void calcIndexSize();
 };
index 51a4c16..ea4337e 100644 (file)
@@ -779,7 +779,3 @@ void GotoCodeGen::writeExec()
 
        out << "        }\n";
 }
-
-void GotoCodeGen::writeEOF()
-{
-}
index 625c2c2..7f58bbd 100644 (file)
@@ -83,7 +83,6 @@ public:
        virtual void STATE_GOTO_ERROR();
 
        virtual void writeData();
-       virtual void writeEOF();
        virtual void writeExec();
 };
 
index 025781f..42659e3 100644 (file)
@@ -427,7 +427,3 @@ void IpGotoCodeGen::writeExec()
        out <<
                "       }\n";
 }
-
-void IpGotoCodeGen::writeEOF()
-{
-}
index f32678b..2664e3b 100644 (file)
@@ -55,7 +55,6 @@ public:
        void BREAK( ostream &ret, int targState );
 
        virtual void writeData();
-       virtual void writeEOF();
        virtual void writeExec();
 
 protected:
index 78f8a26..0787640 100644 (file)
@@ -1018,8 +1018,3 @@ void TabCodeGen::writeExec()
 
        out << "        }\n";
 }
-
-
-void TabCodeGen::writeEOF()
-{
-}
index 745eb18..ea4d6d9 100644 (file)
@@ -87,7 +87,6 @@ protected:
        virtual std::ostream &EOF_ACTION( RedStateAp *state );
        virtual std::ostream &TRANS_ACTION( RedTransAp *trans );
        virtual void calcIndexSize();
-       virtual void writeEOF();
 };
 
 
index 6f90b05..d16ddbf 100644 (file)
@@ -1064,10 +1064,6 @@ void JavaTabCodeGen::writeExec()
        out << "        }\n";
 }
 
-void JavaTabCodeGen::writeEOF()
-{
-}
-
 std::ostream &JavaTabCodeGen::OPEN_ARRAY( string type, string name )
 {
        array_type = type;
index d12af94..85e91ee 100644 (file)
@@ -74,7 +74,6 @@ struct JavaTabCodeGen : public CodeGenData
        void LOCATE_TRANS();
 
        virtual void writeExec();
-       virtual void writeEOF();
        virtual void writeData();
        virtual void writeInit();
        virtual void writeExports();
index dd5ef8a..5324e66 100644 (file)
@@ -332,11 +332,6 @@ void RubyFFlatCodeGen::writeExec()
        out << "end # ragel fflat";
 }
 
-
-void RubyFFlatCodeGen::writeEOF()
-{
-}
-
 /*
  * Local Variables:
  * mode: c++
index 9836b95..b1778be 100644 (file)
@@ -44,7 +44,6 @@ protected:
        virtual int TRANS_ACTION( RedTransAp *trans );
 
        virtual void writeData();
-       virtual void writeEOF();
        virtual void writeExec();
 };
 
index e29aea0..5978065 100644 (file)
@@ -620,10 +620,6 @@ void RubyFlatCodeGen::writeData()
        STATE_IDS();
 }
 
-void RubyFlatCodeGen::writeEOF()
-{
-}
-
 void RubyFlatCodeGen::writeExec()
 {
        out << 
index f7b97a1..3d50b6b 100644 (file)
@@ -82,7 +82,6 @@ protected:
        virtual int TRANS_ACTION( RedTransAp *trans );
 
        virtual void writeData();
-       virtual void writeEOF();
        virtual void writeExec();
 
 };
index c0a4a9f..1dc0629 100644 (file)
@@ -254,10 +254,6 @@ void RubyFTabCodeGen::writeData()
        STATE_IDS();
 }
 
-void RubyFTabCodeGen::writeEOF()
-{
-}
-
 void RubyFTabCodeGen::writeExec()
 {
        out << 
index 0b45e29..d5f1ef1 100644 (file)
@@ -41,7 +41,6 @@ protected:
        virtual int TRANS_ACTION( RedTransAp *trans );
 
        void writeData();
-       void writeEOF();
        void writeExec();
        void calcIndexSize();
 };
index acca082..158444f 100644 (file)
@@ -375,12 +375,6 @@ void RubyTabCodeGen::writeExec()
        out << "        end\n";
 }
 
-void RubyTabCodeGen::writeEOF()
-{
-}
-
-
-
 std::ostream &RubyTabCodeGen::FROM_STATE_ACTION_SWITCH() 
 {
        /* Walk the list of functions, printing the cases. */
index bd11a7b..22c7194 100644 (file)
@@ -56,7 +56,6 @@ public:
        void LOCATE_TRANS();
 
        virtual void writeExec();
-       virtual void writeEOF();
        virtual void writeData();
 
  protected:
index b8d54f6..fcd4a41 100644 (file)
@@ -35,7 +35,6 @@ def run_machine( data )
 
        %% write init;
        %% write exec;
-       %% write eof;
        if  cs >= atoi3_first_final
                puts "ACCEPT"
        else
index 30ca54f..343f3e6 100644 (file)
@@ -113,8 +113,6 @@ void awkemu_execute( struct awkemu *fsm, const char *_data, int _len )
 
 int awkemu_finish( struct awkemu *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == awkemu_error ) 
                return -1;
        if ( fsm->cs >= awkemu_first_final ) 
index 24a362f..ddd552a 100644 (file)
@@ -56,8 +56,6 @@ void test_execute( struct test *fsm, const char *data, int len )
 
 int test_finish( struct test *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == test_error )
                return -1;
        if ( fsm->cs >= test_first_final )
index c447496..e6811fb 100644 (file)
@@ -72,8 +72,6 @@ void CallTest::execute( const char *data, int len )
 
 int CallTest::finish( )
 {
-       %% write eof;
-
        if ( this->cs == CallTest_error )
                return -1;
        if ( this->cs >= CallTest_first_final )
index c253b24..b19b96c 100644 (file)
@@ -79,7 +79,6 @@ int num = 0;
 
 - (int) finish;
 {
-       %% write eof;
        if ( cs == CallTest_error ) 
                return -1;
        return ( cs >= CallTest_first_final ) ? 1 : 0;
index ade8f9a..7ed0456 100644 (file)
@@ -171,7 +171,6 @@ void test( char *buf )
 
        %% write init;
        %% write exec;
-       %% write eof;
 
        if ( cs >= clang_first_final )
                printf("ACCEPT\n");
index fcb6ba8..fb7428e 100644 (file)
 
 - (int) finish;
 {
-       %% write eof;
        if ( cs == Clang_error ) 
                return -1;
        if ( cs >= Clang_first_final ) 
index d950eb3..6c9150e 100644 (file)
@@ -168,7 +168,6 @@ class CLang
        // accepting state.
        int finish( )
        {
-               %% write eof;
                if ( cs == error )
                        return -1;
                if ( cs >= first_final )
index 9c92a1c..0b6e00d 100644 (file)
@@ -147,7 +147,6 @@ int Scanner::execute( char *data, int len )
 
 int Scanner::finish( )
 {
-       %% write eof;
        if ( cs == Scanner_error )
                return -1;
        if ( cs >= Scanner_first_final )
index 07fc01b..9ce3a25 100644 (file)
@@ -196,7 +196,6 @@ int Scanner::execute( char *data, int len )
 
 int Scanner::finish( )
 {
-       %% write eof;
        if ( cs == Scanner_error )
                return -1;
        if ( cs >= Scanner_first_final )
index d08e1a2..02c96be 100644 (file)
@@ -149,7 +149,6 @@ void Scanner::execute( char *data, int len )
 
 int Scanner::finish( )
 {
-       %% write eof;
        if ( cs == Scanner_error )
                return -1;
        if ( cs >= Scanner_first_final )
index fa7499f..8e9dc1b 100644 (file)
@@ -208,8 +208,6 @@ class Scanner
        // accepting state.
        int finish( )
        {
-               %% write eof;
-
                if ( cs == error )
                        return -1;
                if ( cs >= first_final )
index 3c0035b..dcbb715 100644 (file)
@@ -152,8 +152,6 @@ class Scanner
        // accepting state.
        int finish( )
        {
-               %% write eof;
-
                if ( cs == error )
                        return -1;
                if ( cs >= first_final )
index ee0237d..9f34f55 100644 (file)
@@ -76,7 +76,6 @@ int ErrAct::execute( const char *_data, int _len )
 
 int ErrAct::finish( )
 {
-       %% write eof;
        if ( cs == ErrAct_error )
                return -1;
        if ( cs >= ErrAct_first_final )
index 73edec8..2b23324 100644 (file)
@@ -74,7 +74,6 @@
 
 - (int) finish;
 {
-       %% write eof;
        if ( cs == ErrAct_error )
                return -1;
        else if ( cs >= ErrAct_first_final )
index 44632f0..688042f 100644 (file)
@@ -40,8 +40,6 @@ void errintrans_execute( struct errintrans *fsm, const char *_data, int _len )
 
 int errintrans_finish( struct errintrans *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == errintrans_error )
                return -1;
        if ( fsm->cs >= errintrans_first_final )
index c0dde02..dbf74b8 100644 (file)
@@ -30,7 +30,6 @@ def run_machine( data )
 
        %% write init nocs;
        %% write exec;
-       %% write eof;
        if  cs >= test_first_final
                puts "ACCEPT"
        else
index 3244b33..9873af4 100644 (file)
@@ -44,8 +44,6 @@ void forder_execute( struct forder *fsm, const char *_data, int _len )
 
 int forder_finish( struct forder *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == forder_error )
                return -1;
        if ( fsm->cs >= forder_first_final )
index 18eae17..d92f888 100644 (file)
@@ -51,8 +51,6 @@ void forder_execute( struct forder *fsm, const char *_data, int _len )
 
 int forder_finish( struct forder *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == forder_error )
                return -1;
        if ( fsm->cs >= forder_first_final )
index 62fdb86..15ea41e 100644 (file)
@@ -44,8 +44,6 @@ void forder_execute( struct forder *fsm, const char *_data, int _len )
 
 int forder_finish( struct forder *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == forder_error )
                return -1;
        if ( fsm->cs >= forder_first_final )
index 41b9d32..9179c89 100644 (file)
@@ -49,8 +49,6 @@ void high_execute( struct high *fsm, const unsigned int *_data, int _len )
 
 int high_finish( struct high *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == high_error )
                return -1;
        if ( fsm->cs >= high_first_final )
index 1aeb9b3..53f1d80 100644 (file)
@@ -67,7 +67,6 @@ int Fsm::execute( const unsigned char *_data, int _len )
 
 int Fsm::finish()
 {
-       %% write eof;
        if ( cs == Fsm_error )
                return -1;
        if ( cs >= Fsm_first_final )
index 03d2a74..d915bff 100644 (file)
@@ -67,7 +67,6 @@
 
 - (int) finish;
 {
-       %% write eof;
        if ( cs == Fsm_error )
                return -1;
        else if ( cs >= Fsm_first_final )
index 94d25b7..646cec9 100644 (file)
@@ -777,7 +777,6 @@ int Parser::execute( LangEl *_data, int _len )
 
 int Parser::finish( )
 {
-       %% write eof;
        if ( cs == Parser_error )
                return -1;
        if ( cs >= Parser_first_final )
index 96c4392..4d9dac4 100644 (file)
@@ -162,7 +162,6 @@ void Scanner::run( char *buf )
                /* Machine failed before finding a token. */
                cout << "PARSE ERROR" << endl;
        }
-       %% write eof;
 }
 
 int main()
index 418c3f4..c550ebb 100644 (file)
@@ -39,8 +39,6 @@ void min_execute( struct min *fsm, const char *_data, int _len )
 
 int min_finish( struct min *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == min_error )
                return -1;
        if ( fsm->cs >= min_first_final )
index eaa52bd..43e6214 100644 (file)
@@ -34,8 +34,6 @@ void range_execute( struct range *fsm, const char *_data, int _len )
 
 int range_finish( struct range *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == range_error )
                return -1;
        if ( fsm->cs >= range_first_final )
index c184ba7..66812f4 100644 (file)
@@ -87,7 +87,6 @@ void test( char *buf )
        pe = buf + len;
 
        %% write exec;
-       %% write eof;
 
        if ( cs == recdescent_error ) {
                /* Machine failed before finding a token. */
index 2f3ef80..1e51451 100644 (file)
@@ -78,7 +78,6 @@ class recdescent2
 
                %% write init;
                %% write exec;
-               %% write eof;
 
                if ( cs == recdescent_error )
                        System.out.println( "SCANNER ERROR" );
index 35a8e08..c5621e1 100644 (file)
@@ -77,7 +77,6 @@ def run_machine( data )
 
        %% write init;
        %% write exec;
-       %% write eof;
 
        if cs == recdescent3_error
                puts "SCANNER_ERROR"
index 23638b3..b14067e 100644 (file)
@@ -62,7 +62,6 @@ int Rep::execute( const char *_data, int _len )
 
 int Rep::finish( )
 {
-       %% write eof;
        if ( cs == Rep_error )
                return -1;
        if ( cs >= Rep_first_final )
index 003ebc9..e2f4bc9 100644 (file)
@@ -37,7 +37,6 @@ def run_machine( data )
 
        %% write init;
        %% write exec;
-       %% write eof;
        if  cs >= ruby1_first_final
                puts "ACCEPT"
        else
index 679c11a..884f3f0 100644 (file)
@@ -67,8 +67,6 @@ void state_chart_execute( struct state_chart *fsm, const char *_data, int _len )
 
 int state_chart_finish( struct state_chart *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == state_chart_error )
                return -1;
        if ( fsm->cs >= state_chart_first_final )
index af7bfd0..0d5eea8 100644 (file)
@@ -150,8 +150,6 @@ void strs_execute( struct strs *fsm, const char *_data, int _len )
 
 int strs_finish( struct strs *fsm )
 {
-       %% write eof;
-
        if ( fsm->cs == strs_error )
                return -1;
        if ( fsm->cs >= strs_first_final )
index 9048ad7..edad63b 100644 (file)
@@ -1319,8 +1319,6 @@ void test( char *buf )
        %% write init;
        %% write exec;
 
-       %% write eof;
-
        if ( fsm->cs >= strs_first_final )
                printf("ACCEPT\n");
        else
index ae1ab3f..cdf916d 100644 (file)
@@ -119,7 +119,6 @@ int Scanner::execute( char *data, int len )
 
 int Scanner::finish( )
 {
-       %% write eof;
        if ( cs == Scanner_error )
                return -1;
        if ( cs >= Scanner_first_final )
index 6ad7e9a..a8beace 100644 (file)
@@ -106,7 +106,6 @@ void Concurrent::execute( const char *data, int len )
 
 int Concurrent::finish( )
 {
-       %% write eof;
        if ( cs == Concurrent_error )
                return -1;
        if ( cs >= Concurrent_first_final )
index ca13f43..3a76400 100644 (file)
@@ -92,7 +92,6 @@ struct XML
 
        int XML::finish( )
        {
-               %% write eof;
                if ( cs == XML_error )
                        return -1;
                if ( cs >= XML_first_final )