Get ragel working again while the direct-to-backend code is being written.
[external/ragel.git] / ragel / fsmap.cpp
index ff6f929..12d9e56 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2002-2004 Adrian Thurston <thurston@cs.queensu.ca>
+ *  Copyright 2002-2004 Adrian Thurston <thurston@complang.org>
  */
 
 /*  This file is part of Ragel.
@@ -302,6 +302,18 @@ void FsmAp::fillGaps( StateAp *state )
        }
 }
 
+void FsmAp::setErrorActions( StateAp *state, const ActionTable &other )
+{
+       /* Fill any gaps in the out list with an error transition. */
+       fillGaps( state );
+
+       /* Set error transitions in the transitions that go to error. */
+       for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+               if ( trans->toState == 0 )
+                       trans->actionTable.setActions( other );
+       }
+}
+
 void FsmAp::setErrorAction( StateAp *state, int ordering, Action *action )
 {
        /* Fill any gaps in the out list with an error transition. */