From: thurston Date: Wed, 14 Mar 2007 17:46:56 +0000 (+0000) Subject: Handle the unset startState case in dot generation. X-Git-Tag: 2.0_alpha~345 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a374a8e057783dad41ae44628be16ce457046e6;p=external%2Fragel.git Handle the unset startState case in dot generation. git-svn-id: http://svn.complang.org/ragel/trunk@145 052ea7fc-9027-0410-9066-f65837a77df0 --- diff --git a/rlgen-dot/gvdotgen.cpp b/rlgen-dot/gvdotgen.cpp index 6b17e6d..3cdff55 100644 --- a/rlgen-dot/gvdotgen.cpp +++ b/rlgen-dot/gvdotgen.cpp @@ -229,7 +229,9 @@ void GraphvizDotGen::writeDotFile( ) /* Define the psuedo states. Transitions will be done after the states * have been defined as either final or not final. */ out << " node [ shape = point ];\n"; - out << " ENTRY;\n"; + + if ( redFsm->startState != 0 ) + out << " ENTRY;\n"; /* Psuedo states for entry points in the entry map. */ for ( EntryIdVect::Iter en = entryPointIds; en.lte(); en++ ) { @@ -280,8 +282,8 @@ void GraphvizDotGen::writeDotFile( ) writeTransList( st ); /* Transitions into the start state. */ - out << " ENTRY -> " << redFsm->startState->id << " [ label = \"IN"; - out << "\" ];\n"; + if ( redFsm->startState != 0 ) + out << " ENTRY -> " << redFsm->startState->id << " [ label = \"IN\" ];\n"; /* Transitions into the entry points. */ for ( EntryIdVect::Iter en = entryPointIds; en.lte(); en++ ) {