Print any actions that are in State::eofTrans. These come from scanners only.
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Thu, 14 Feb 2008 19:12:37 +0000 (19:12 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Thu, 14 Feb 2008 19:12:37 +0000 (19:12 +0000)
git-svn-id: http://svn.complang.org/ragel/trunk@414 052ea7fc-9027-0410-9066-f65837a77df0

rlgen-dot/gvdotgen.cpp

index 3cdff55..631f3cb 100644 (file)
@@ -241,6 +241,8 @@ void GraphvizDotGen::writeDotFile( )
 
        /* Psuedo states for final states with eof actions. */
        for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) {
+               if ( st->eofTrans != 0 && st->eofTrans->action != 0 )
+                       out << "        eof_" << st->id << ";\n";
                if ( st->eofAction != 0 )
                        out << "        eof_" << st->id << ";\n";
        }
@@ -295,6 +297,11 @@ void GraphvizDotGen::writeDotFile( )
 
        /* Out action transitions. */
        for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) {
+               if ( st->eofTrans != 0 && st->eofTrans->action != 0 ) {
+                       out << "        " << st->id << " -> eof_" << 
+                                       st->id << " [ label = \"EOF"; 
+                       ACTION( st->eofTrans->action ) << "\" ];\n";
+               }
                if ( st->eofAction != 0 ) {
                        out << "        " << st->id << " -> eof_" << 
                                        st->id << " [ label = \"EOF";