From 34f302ca591559804200bd5194ff1c7474e6686a Mon Sep 17 00:00:00 2001 From: thurston Date: Sun, 1 Jun 2008 19:10:17 +0000 Subject: [PATCH] In the condition code we need to copy transitions that have non-empty 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 | 6 ++---- ragel/fsmstate.cpp | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ragel/fsmgraph.h b/ragel/fsmgraph.h index ba3848e..2ccfeb0 100644 --- a/ragel/fsmgraph.h +++ b/ragel/fsmgraph.h @@ -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; diff --git a/ragel/fsmstate.cpp b/ragel/fsmstate.cpp index 722f9d8..ed8f7c7 100644 --- a/ragel/fsmstate.cpp +++ b/ragel/fsmstate.cpp @@ -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 ); } -- 2.7.4