In the condition code we need to copy transitions that have non-empty
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sun, 1 Jun 2008 19:10:17 +0000 (19:10 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sun, 1 Jun 2008 19:10:17 +0000 (19:10 +0000)
lmActionTable arrays so we can't assert emptyness in the constructor. Lift out
the assertion and copy the array in the constructor.

git-svn-id: http://svn.complang.org/ragel/trunk@453 052ea7fc-9027-0410-9066-f65837a77df0

ragel/fsmgraph.h
ragel/fsmstate.cpp

index ba3848e..2ccfeb0 100644 (file)
@@ -380,10 +380,8 @@ struct TransAp
                highKey(other.highKey),
                fromState(0), toState(0),
                actionTable(other.actionTable),
-               priorTable(other.priorTable)
-       {
-               assert( lmActionTable.length() == 0 && other.lmActionTable.length() == 0 );
-       }
+               priorTable(other.priorTable),
+               lmActionTable(other.lmActionTable) {}
 
        Key lowKey, highKey;
        StateAp *fromState;
index 722f9d8..ed8f7c7 100644 (file)
@@ -156,6 +156,7 @@ StateAp::StateAp(const StateAp &other)
                /* Dupicate and store the orginal target in the transition. This will
                 * be corrected once all the states have been created. */
                TransAp *newTrans = new TransAp(*trans);
+               assert( trans->lmActionTable.length() == 0 );
                newTrans->toState = trans->toState;
                outList.append( newTrans );
        }