From 0a374a8e057783dad41ae44628be16ce457046e6 Mon Sep 17 00:00:00 2001 From: thurston Date: Wed, 14 Mar 2007 17:46:56 +0000 Subject: [PATCH] Handle the unset startState case in dot generation. git-svn-id: http://svn.complang.org/ragel/trunk@145 052ea7fc-9027-0410-9066-f65837a77df0 --- rlgen-dot/gvdotgen.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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++ ) { -- 2.7.4