Changed the names of the variables that represent the no* options.
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sun, 4 Jan 2009 20:39:52 +0000 (20:39 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sun, 4 Jan 2009 20:39:52 +0000 (20:39 +0000)
git-svn-id: http://svn.complang.org/ragel/trunk@659 052ea7fc-9027-0410-9066-f65837a77df0

27 files changed:
ragel/cdcodegen.cpp
ragel/cdfflat.cpp
ragel/cdfgoto.cpp
ragel/cdflat.cpp
ragel/cdftable.cpp
ragel/cdgoto.cpp
ragel/cdipgoto.cpp
ragel/cdsplit.cpp
ragel/cdtable.cpp
ragel/cscodegen.cpp
ragel/csfflat.cpp
ragel/csfgoto.cpp
ragel/csflat.cpp
ragel/csftable.cpp
ragel/csgoto.cpp
ragel/csipgoto.cpp
ragel/cssplit.cpp
ragel/cstable.cpp
ragel/gendata.cpp
ragel/gendata.h
ragel/javacodegen.cpp
ragel/rbxgoto.cpp
ragel/rubycodegen.cpp
ragel/rubyfflat.cpp
ragel/rubyflat.cpp
ragel/rubyftable.cpp
ragel/rubytable.cpp

index ec2ddb0..0a98469 100644 (file)
@@ -700,7 +700,7 @@ void FsmCodeGen::writeInit()
 {
        out << "        {\n";
 
-       if ( writeCS )
+       if ( !noCS )
                out << "\t" << CS() << " = " << START() << ";\n";
        
        /* If there are any calls, then the stack top needs initialization. */
@@ -718,7 +718,7 @@ void FsmCodeGen::writeInit()
 
 string FsmCodeGen::DATA_PREFIX()
 {
-       if ( dataPrefix )
+       if ( !noPrefix )
                return FSM_NAME() + "_";
        return "";
 }
@@ -759,10 +759,10 @@ void FsmCodeGen::STATE_IDS()
        if ( redFsm->startState != 0 )
                STATIC_VAR( "int", START() ) << " = " << START_STATE_ID() << ";\n";
 
-       if ( writeFirstFinal )
+       if ( !noFinal )
                STATIC_VAR( "int" , FIRST_FINAL() ) << " = " << FIRST_FINAL_STATE() << ";\n";
 
-       if ( writeErr )
+       if ( !noError )
                STATIC_VAR( "int", ERROR() ) << " = " << ERROR_STATE() << ";\n";
 
        out << "\n";
index 46b3c1f..1617c2d 100644 (file)
@@ -266,7 +266,7 @@ void FFlatCodeGen::writeExec()
                        "       " << WIDE_ALPH_TYPE() << " _widec;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -337,7 +337,7 @@ void FFlatCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index c708280..7474533 100644 (file)
@@ -189,7 +189,7 @@ void FGotoCodeGen::writeExec()
        if ( redFsm->anyConditions() )
                out << "        " << WIDE_ALPH_TYPE() << " _widec;\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -244,7 +244,7 @@ void FGotoCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index ee8f19c..f171277 100644 (file)
@@ -714,7 +714,7 @@ void FlatCodeGen::writeExec()
 
        out << "\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -798,7 +798,7 @@ void FlatCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index 2a2184e..f21c781 100644 (file)
@@ -312,7 +312,7 @@ void FTabCodeGen::writeExec()
 
        out << "\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out <<
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -389,7 +389,7 @@ void FTabCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index 9404bd0..a54ae0f 100644 (file)
@@ -680,7 +680,7 @@ void GotoCodeGen::writeExec()
 
        out << "\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -743,7 +743,7 @@ void GotoCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index 35a1755..d44c240 100644 (file)
@@ -177,7 +177,7 @@ void IpGotoCodeGen::GOTO_HEADER( RedStateAp *state )
 
        /* Advance and test buffer pos. */
        if ( state->labelNeeded ) {
-               if ( hasEnd ) {
+               if ( !noEnd ) {
                        out <<
                                "       if ( ++" << P() << " == " << PE() << " )\n"
                                "               goto _test_eof" << state->id << ";\n";
@@ -352,7 +352,7 @@ void IpGotoCodeGen::setLabelsNeeded()
                }
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) {
                        if ( st != redFsm->errState )
                                st->outNeeded = st->labelNeeded;
@@ -381,7 +381,7 @@ void IpGotoCodeGen::writeExec()
        if ( redFsm->anyConditions() )
                out << "        " << WIDE_ALPH_TYPE() << " _widec;\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -399,7 +399,7 @@ void IpGotoCodeGen::writeExec()
                        "       }\n"
                        "\n";
 
-               if ( hasEnd ) {
+               if ( !noEnd ) {
                        testEofUsed = true;
                        out << 
                                "       if ( ++" << P() << " == " << PE() << " )\n"
index 90e917b..443e761 100644 (file)
@@ -76,7 +76,7 @@ void SplitCodeGen::GOTO_HEADER( RedStateAp *state, bool stateInPartition )
 
        /* Advance and test buffer pos. */
        if ( state->labelNeeded ) {
-               if ( hasEnd ) {
+               if ( !noEnd ) {
                        out <<
                                "       if ( ++" << P() << " == " << PE() << " )\n"
                                "               goto _out" << state->id << ";\n";
@@ -237,7 +237,7 @@ std::ostream &SplitCodeGen::PARTITION( int partition )
                        "\n";
 
 
-               if ( hasEnd ) {
+               if ( !noEnd ) {
                        outLabelUsed = true;
                        out << 
                                "       if ( ++" << P() << " == " << PE() << " )\n"
@@ -309,13 +309,13 @@ void SplitCodeGen::writeData()
                "static const int " << START() << " = " << START_STATE_ID() << ";\n"
                "\n";
 
-       if ( writeFirstFinal ) {
+       if ( !noFinal ) {
                out <<
                        "static const int " << FIRST_FINAL() << " = " << FIRST_FINAL_STATE() << ";\n"
                        "\n";
        }
 
-       if ( writeErr ) {
+       if ( !noError ) {
                out <<
                        "static const int " << ERROR() << " = " << ERROR_STATE() << ";\n"
                        "\n";
@@ -388,7 +388,7 @@ void SplitCodeGen::writeExec()
                "       {\n"
                "       int _stat = 0;\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out <<
                        "       if ( " << P() << " == " << PE() << " )\n"
                        "               goto _out;\n";
@@ -400,7 +400,7 @@ void SplitCodeGen::writeExec()
         * partition-switch exit from the last partition. */
        out << "_reenter:\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out <<
                        "       if ( ++" << P() << " == " << PE() << " )\n"
                        "               goto _out;\n";
@@ -425,7 +425,7 @@ void SplitCodeGen::writeExec()
                "       if ( _stat )\n"
                "               goto _reenter;\n";
        
-       if ( hasEnd )
+       if ( !noEnd )
                out << "        _out: {}\n";
 
        out <<
@@ -507,7 +507,7 @@ void SplitCodeGen::setLabelsNeeded()
                }
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ )
                        st->outNeeded = st->labelNeeded;
        }
index b9d5361..4b455bc 100644 (file)
@@ -954,7 +954,7 @@ void TabCodeGen::writeExec()
                "       " << PTR_CONST() << WIDE_ALPH_TYPE() << POINTER() << "_keys;\n"
                "\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -1043,7 +1043,7 @@ void TabCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index e18969e..69c20bf 100644 (file)
@@ -659,7 +659,7 @@ void CSharpFsmCodeGen::writeInit()
 {
        out << "        {\n";
 
-       if ( writeCS )
+       if ( !noCS )
                out << "\t" << CS() << " = " << START() << ";\n";
        
        /* If there are any calls, then the stack top needs initialization. */
@@ -677,7 +677,7 @@ void CSharpFsmCodeGen::writeInit()
 
 string CSharpFsmCodeGen::DATA_PREFIX()
 {
-       if ( dataPrefix )
+       if ( !noPrefix )
                return FSM_NAME() + "_";
        return "";
 }
@@ -718,10 +718,10 @@ void CSharpFsmCodeGen::STATE_IDS()
        if ( redFsm->startState != 0 )
                STATIC_VAR( "int", START() ) << " = " << START_STATE_ID() << ";\n";
 
-       if ( writeFirstFinal )
+       if ( !noFinal )
                STATIC_VAR( "int" , FIRST_FINAL() ) << " = " << FIRST_FINAL_STATE() << ";\n";
 
-       if ( writeErr )
+       if ( !noError )
                STATIC_VAR( "int", ERROR() ) << " = " << ERROR_STATE() << ";\n";
 
        out << "\n";
index f3dc864..0b9778a 100644 (file)
@@ -270,7 +270,7 @@ void CSharpFFlatCodeGen::writeExec()
                        "       " << WIDE_ALPH_TYPE() << " _widec;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -341,7 +341,7 @@ void CSharpFFlatCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index 3c19d44..0f9cee6 100644 (file)
@@ -189,7 +189,7 @@ void CSharpFGotoCodeGen::writeExec()
        if ( redFsm->anyConditions() )
                out << "        " << WIDE_ALPH_TYPE() << " _widec;\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -244,7 +244,7 @@ void CSharpFGotoCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index 65f5871..dc64cdd 100644 (file)
@@ -735,7 +735,7 @@ void CSharpFlatCodeGen::writeExec()
 
        out << "\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -819,7 +819,7 @@ void CSharpFlatCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index 9d1a1fb..32dc19d 100644 (file)
@@ -313,7 +313,7 @@ void CSharpFTabCodeGen::writeExec()
 
        out << "\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out <<
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -390,7 +390,7 @@ void CSharpFTabCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index 70393f3..9f695db 100644 (file)
@@ -680,7 +680,7 @@ void CSharpGotoCodeGen::writeExec()
 
        out << "\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -743,7 +743,7 @@ void CSharpGotoCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index d2bae23..26d3cd4 100644 (file)
@@ -173,7 +173,7 @@ void CSharpIpGotoCodeGen::GOTO_HEADER( RedStateAp *state )
 
        /* Advance and test buffer pos. */
        if ( state->labelNeeded ) {
-               if ( hasEnd ) {
+               if ( !noEnd ) {
                        out <<
                                "       if ( ++" << P() << " == " << PE() << " )\n"
                                "               goto _test_eof" << state->id << ";\n";
@@ -346,7 +346,7 @@ void CSharpIpGotoCodeGen::setLabelsNeeded()
                }
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) {
                        if ( st != redFsm->errState )
                                st->outNeeded = st->labelNeeded;
@@ -375,7 +375,7 @@ void CSharpIpGotoCodeGen::writeExec()
        if ( redFsm->anyConditions() )
                out << "        " << WIDE_ALPH_TYPE() << " _widec;\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -393,7 +393,7 @@ void CSharpIpGotoCodeGen::writeExec()
                        "       }\n"
                        "\n";
 
-               if ( hasEnd ) {
+               if ( !noEnd ) {
                        testEofUsed = true;
                        out << 
                                "       if ( ++" << P() << " == " << PE() << " )\n"
index d7bf9ca..c485b95 100644 (file)
@@ -74,7 +74,7 @@ void CSharpSplitCodeGen::GOTO_HEADER( RedStateAp *state, bool stateInPartition )
 
        /* Advance and test buffer pos. */
        if ( state->labelNeeded ) {
-               if ( hasEnd ) {
+               if ( !noEnd ) {
                        out <<
                                "       if ( ++" << P() << " == " << PE() << " )\n"
                                "               goto _out" << state->id << ";\n";
@@ -229,7 +229,7 @@ std::ostream &CSharpSplitCodeGen::PARTITION( int partition )
                        "\n";
 
 
-               if ( hasEnd ) {
+               if ( !noEnd ) {
                        outLabelUsed = true;
                        out << 
                                "       if ( ++" << P() << " == " << PE() << " )\n"
@@ -301,13 +301,13 @@ void CSharpSplitCodeGen::writeData()
                "const int " << START() << " = " << START_STATE_ID() << ";\n"
                "\n";
 
-       if ( writeFirstFinal ) {
+       if ( !noFinal ) {
                out <<
                        "const int " << FIRST_FINAL() << " = " << FIRST_FINAL_STATE() << ";\n"
                        "\n";
        }
 
-       if ( writeErr ) {
+       if ( !noError ) {
                out <<
                        "const int " << ERROR() << " = " << ERROR_STATE() << ";\n"
                        "\n";
@@ -380,7 +380,7 @@ void CSharpSplitCodeGen::writeExec()
                "       {\n"
                "       int _stat = 0;\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out <<
                        "       if ( " << P() << " == " << PE() << " )\n"
                        "               goto _out;\n";
@@ -392,7 +392,7 @@ void CSharpSplitCodeGen::writeExec()
         * partition-switch exit from the last partition. */
        out << "_reenter:\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out <<
                        "       if ( ++" << P() << " == " << PE() << " )\n"
                        "               goto _out;\n";
@@ -417,7 +417,7 @@ void CSharpSplitCodeGen::writeExec()
                "       if ( _stat )\n"
                "               goto _reenter;\n";
        
-       if ( hasEnd )
+       if ( !noEnd )
                out << "        _out: {}\n";
 
        out <<
@@ -499,7 +499,7 @@ void CSharpSplitCodeGen::setLabelsNeeded()
                }
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ )
                        st->outNeeded = st->labelNeeded;
        }
index d7dac7d..1193be3 100644 (file)
@@ -958,7 +958,7 @@ void CSharpTabCodeGen::writeExec()
                "\n";
 //             "       " << PTR_CONST() << WIDE_ALPH_TYPE() << POINTER() << "_keys;\n"
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                testEofUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n"
@@ -1047,7 +1047,7 @@ void CSharpTabCodeGen::writeExec()
                        "               goto _out;\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " )\n"
                        "               goto _resume;\n";
index cb6b62c..3cf1a35 100644 (file)
@@ -101,11 +101,11 @@ CodeGenData::CodeGenData( ostream &out )
        dataExpr(0),
        wantComplete(0),
        hasLongestMatch(false),
-       hasEnd(true),
-       dataPrefix(true),
-       writeFirstFinal(true),
-       writeErr(true),
-       writeCS(true)
+       noEnd(false),
+       noPrefix(false),
+       noFinal(false),
+       noError(false),
+       noCS(false)
 {}
 
 
@@ -723,11 +723,11 @@ void CodeGenData::writeStatement( InputLoc &loc, int nargs, char **args )
        if ( strcmp( args[0], "data" ) == 0 ) {
                for ( int i = 1; i < nargs; i++ ) {
                        if ( strcmp( args[i], "noerror" ) == 0 )
-                               writeErr = false;
+                               noError = true;
                        else if ( strcmp( args[i], "noprefix" ) == 0 )
-                               dataPrefix = false;
+                               noPrefix = true;
                        else if ( strcmp( args[i], "nofinal" ) == 0 )
-                               writeFirstFinal = false;
+                               noFinal = true;
                        else {
                                source_warning(loc) << "unrecognized write option \"" << 
                                                args[i] << "\"" << endl;
@@ -738,7 +738,7 @@ void CodeGenData::writeStatement( InputLoc &loc, int nargs, char **args )
        else if ( strcmp( args[0], "init" ) == 0 ) {
                for ( int i = 1; i < nargs; i++ ) {
                        if ( strcmp( args[i], "nocs" ) == 0 )
-                               writeCS = false;
+                               noCS = true;
                        else {
                                source_warning(loc) << "unrecognized write option \"" << 
                                                args[i] << "\"" << endl;
@@ -749,7 +749,7 @@ void CodeGenData::writeStatement( InputLoc &loc, int nargs, char **args )
        else if ( strcmp( args[0], "exec" ) == 0 ) {
                for ( int i = 1; i < nargs; i++ ) {
                        if ( strcmp( args[i], "noend" ) == 0 )
-                               hasEnd = false;
+                               noEnd = true;
                        else {
                                source_warning(loc) << "unrecognized write option \"" << 
                                                args[i] << "\"" << endl;
index ada3eb5..0439722 100644 (file)
@@ -141,11 +141,11 @@ struct CodeGenData
        ExportList exportList;
 
        /* Write options. */
-       bool hasEnd;
-       bool dataPrefix;
-       bool writeFirstFinal;
-       bool writeErr;
-       bool writeCS;
+       bool noEnd;
+       bool noPrefix;
+       bool noFinal;
+       bool noError;
+       bool noCS;
 
        void createMachine();
        void initActionList( unsigned long length );
index edafdb3..1c3b09c 100644 (file)
@@ -299,7 +299,7 @@ void JavaTabCodeGen::INLINE_LIST( ostream &ret, GenInlineList *inlineList,
 
 string JavaTabCodeGen::DATA_PREFIX()
 {
-       if ( dataPrefix )
+       if ( !noPrefix )
                return FSM_NAME() + "_";
        return "";
 }
@@ -1016,10 +1016,10 @@ void JavaTabCodeGen::writeData()
        if ( redFsm->startState != 0 )
                STATIC_VAR( "int", START() ) << " = " << START_STATE_ID() << ";\n";
 
-       if ( writeFirstFinal )
+       if ( !noFinal )
                STATIC_VAR( "int" , FIRST_FINAL() ) << " = " << FIRST_FINAL_STATE() << ";\n";
 
-       if ( writeErr )
+       if ( !noError )
                STATIC_VAR( "int", ERROR() ) << " = " << ERROR_STATE() << ";\n";
        
        out << "\n";
@@ -1067,7 +1067,7 @@ void JavaTabCodeGen::writeExec()
                "       switch ( _goto_targ ) {\n"
                "       case 0:\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( " << P() << " == " << PE() << " ) {\n"
                        "               _goto_targ = " << _test_eof << ";\n"
@@ -1152,7 +1152,7 @@ void JavaTabCodeGen::writeExec()
                        "       }\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if ( ++" << P() << " != " << PE() << " ) {\n"
                        "               _goto_targ = " << _resume << ";\n"
@@ -1666,7 +1666,7 @@ void JavaTabCodeGen::writeInit()
 {
        out << "        {\n";
 
-       if ( writeCS )
+       if ( !noCS )
                out << "\t" << CS() << " = " << START() << ";\n";
        
        /* If there are any calls, then the stack top needs initialization. */
index 96a571d..dc9c6f8 100644 (file)
@@ -717,7 +717,7 @@ void RbxGotoCodeGen::writeExec()
 
        out << "\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                outLabelUsed = true;
                out << 
                        "       if ( " << P() << " == " << PE() << " )\n";
@@ -785,7 +785,7 @@ void RbxGotoCodeGen::writeExec()
                        "       end" << "\n";
        }
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out <<  "       "  << P() << " += 1\n"
                        "       if ( " << P() << " != " << PE() << " )\n";
                rbxGoto(out << "                ", "_resume") << "\n" <<
index ba189be..6842fe6 100644 (file)
@@ -181,7 +181,7 @@ void RubyCodeGen::genLineDirective( ostream &out )
 
 string RubyCodeGen::DATA_PREFIX()
 {
-       if ( dataPrefix )
+       if ( !noPrefix )
                return FSM_NAME() + "_";
        return "";
 }
@@ -513,10 +513,10 @@ void RubyCodeGen::STATE_IDS()
        if ( redFsm->startState != 0 )
                STATIC_VAR( "int", START() ) << " = " << START_STATE_ID() << ";\n";
 
-       if ( writeFirstFinal )
+       if ( !noFinal )
                STATIC_VAR( "int" , FIRST_FINAL() ) << " = " << FIRST_FINAL_STATE() << ";\n";
 
-       if ( writeErr )
+       if ( !noError )
                STATIC_VAR( "int", ERROR() ) << " = " << ERROR_STATE() << ";\n";
 
        out << "\n";
@@ -867,10 +867,10 @@ void RubyCodeGen::writeInit()
        
        out << "        " << P() << " ||= 0\n";
 
-       if ( hasEnd ) 
+       if ( !noEnd ) 
                out << "        " << PE() << " ||= " << DATA() << ".length\n";
 
-       if ( writeCS )
+       if ( !noCS )
                out << "        " << CS() << " = " << START() << "\n";
 
        /* If there are any calls, then the stack top needs initialization. */
index 2d9f0a7..a206eec 100644 (file)
@@ -347,7 +347,7 @@ void RubyFFlatCodeGen::writeExec()
                "       while true\n"
                "       if _goto_level <= 0\n";
        
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if " << P() << " == " << PE() << "\n"
                        "               _goto_level = _test_eof\n"
@@ -424,7 +424,7 @@ void RubyFFlatCodeGen::writeExec()
 
        out << "        " << P() << " += 1\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if " << P() << " != " << PE() << "\n"
                        "               _goto_level = _resume\n"
index ddbf394..4688fcc 100644 (file)
@@ -685,7 +685,7 @@ void RubyFlatCodeGen::writeExec()
                "       _trigger_goto = false\n"
                "       if _goto_level <= 0\n";
        
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if " << P() << " == " << PE() << "\n"
                        "               _goto_level = _test_eof\n"
@@ -792,7 +792,7 @@ void RubyFlatCodeGen::writeExec()
 
        out << "        " << P() << " += 1\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if " << P() << " != " << PE() << "\n"
                        "               _goto_level = _resume\n"
index c8a0b36..2d95fc5 100644 (file)
@@ -386,7 +386,7 @@ void RubyFTabCodeGen::writeExec()
                "       while true\n"
                "       if _goto_level <= 0\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if " << P() << " == " << PE() << "\n"
                        "               _goto_level = _test_eof\n"
@@ -470,7 +470,7 @@ void RubyFTabCodeGen::writeExec()
 
        out << "        " << P() << " += 1\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if " << P() << " != " << PE() << "\n"
                        "               _goto_level = _resume\n"
index a945a53..653d738 100644 (file)
@@ -263,7 +263,7 @@ void RubyTabCodeGen::writeExec()
                "       _trigger_goto = false\n"
                "       if _goto_level <= 0\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if " << P() << " == " << PE() << "\n"
                        "               _goto_level = _test_eof\n"
@@ -374,7 +374,7 @@ void RubyTabCodeGen::writeExec()
 
        out << "        " << P() << " += 1\n";
 
-       if ( hasEnd ) {
+       if ( !noEnd ) {
                out << 
                        "       if " << P() << " != " << PE() << "\n"
                        "               _goto_level = _resume\n"