summaryrefslogtreecommitdiff
path: root/colm/dotgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'colm/dotgen.cpp')
-rw-r--r--colm/dotgen.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/colm/dotgen.cpp b/colm/dotgen.cpp
index 2fd9bf09..30788a4c 100644
--- a/colm/dotgen.cpp
+++ b/colm/dotgen.cpp
@@ -79,8 +79,12 @@ void ParseData::writeDotFile( PdaGraph *graph )
/* 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"
- " ENTRY [ label = \"\" ];\n"
+ " node [ shape = point ];\n";
+
+ for ( int i = 0; i < graph->entryStateSet.length(); i++ )
+ out << "\tENTRY" << i << " [ label = \"\" ];\n";
+
+ out <<
"\n"
" node [ shape = circle, fixedsize = true, height = 0.2 ];\n";
@@ -94,8 +98,9 @@ void ParseData::writeDotFile( PdaGraph *graph )
for ( PdaStateList::Iter st = graph->stateList; st.lte(); st++ )
writeTransList( st );
- /* Transitions into the start state. */
- out << " ENTRY -> " << graph->startState->stateNum << " [ label = \"\" ];\n";
+ /* Start state and other entry points. */
+ for ( PdaStateSet::Iter st = graph->entryStateSet; st.lte(); st++ )
+ out << "\tENTRY" << st.pos() << " -> " << (*st)->stateNum << " [ label = \"\" ];\n";
out <<
"}\n";
@@ -103,9 +108,6 @@ void ParseData::writeDotFile( PdaGraph *graph )
void ParseData::writeDotFile()
{
- for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
- if ( lel->parserId >= 0 )
- writeDotFile( lel->pdaGraph );
- }
+ writeDotFile( pdaGraph );
}