Updated Victor's email address. The frontend parameter check must accept -R.
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Tue, 6 Feb 2007 04:38:39 +0000 (04:38 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Tue, 6 Feb 2007 04:38:39 +0000 (04:38 +0000)
The genLineDirective function in rlcodegen must guard against graphviz dotfile
generation.

If the error state exists, it is now the first state. Since the graphviz
generation does not print the error state, a gap over the error state made it
appear as though a state was missing.

git-svn-id: http://svn.complang.org/ragel/trunk@83 052ea7fc-9027-0410-9066-f65837a77df0

ChangeLog
ragel/fsmbase.cpp
ragel/main.cpp
rlcodegen/fsmcodegen.cpp
rlcodegen/gvdotgen.cpp
rlgen-ruby/rubycodegen.cpp
rlgen-ruby/rubycodegen.h

index ce7583c..cb72a28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
-Ragel 5.18 - Feb 5, 2007
-========================
+Ragel 5.18 - TBD 
+================
  -Backened class structure reorganized to make it easier to add new code
   generators without having to also modify the existing code generators.
  -The java code generation was then split out into it's own exectuable to
index 96b3488..f1d7141 100644 (file)
@@ -508,11 +508,11 @@ void FsmAp::depthFirstOrdering()
 
        /* Add back to the state list from the start state and all other entry
         * points. */
+       if ( errState != 0 )
+               depthFirstOrdering( errState );
        depthFirstOrdering( startState );
        for ( EntryMap::Iter en = entryPoints; en.lte(); en++ )
                depthFirstOrdering( en->value );
-       if ( errState != 0 )
-               depthFirstOrdering( errState );
        
        /* Make sure we put everything back on. */
        assert( stateListLen == stateList.length() );
index ac90dd5..aacccc9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2005 Adrian Thurston <thurston@cs.queensu.ca>
+ *  Copyright 2001-2007 Adrian Thurston <thurston@cs.queensu.ca>
  */
 
 /*  This file is part of Ragel.
@@ -129,7 +129,7 @@ void escapeLineDirectivePath( std::ostream &out, char *path )
 /* Main, process args and call yyparse to start scanning input. */
 int main(int argc, char **argv)
 {
-       ParamCheck pc("o:nmleabjkS:M:CDJvHh?-:s", argc, argv);
+       ParamCheck pc("o:nmleabjkS:M:CDJRvHh?-:s", argc, argv);
        char *inputFileName = 0;
        char *outputFileName = 0;
 
index 652c05e..7ac1a5a 100644 (file)
@@ -52,10 +52,11 @@ void lineDirective( ostream &out, char *fileName, int line )
 
 void genLineDirective( ostream &out )
 {
-       assert( outputFormat == OutCode );
-       std::streambuf *sbuf = out.rdbuf();
-       output_filter *filter = static_cast<output_filter*>(sbuf);
-       lineDirective( out, filter->fileName, filter->line + 1 );
+       if ( outputFormat == OutCode ) {
+               std::streambuf *sbuf = out.rdbuf();
+               output_filter *filter = static_cast<output_filter*>(sbuf);
+               lineDirective( out, filter->fileName, filter->line + 1 );
+       }
 }
 
 
index 721ec34..0f87a26 100644 (file)
@@ -276,10 +276,6 @@ void GraphvizDotGen::finishRagelDef()
        if ( !graphvizDone ) {
                graphvizDone = true;
 
-               /* Do ordering and choose state ids. */
-               redFsm->depthFirstOrdering();
-               redFsm->sequentialStateIds();
-
                /* For dot file generation we want to pick default transitions. */
                redFsm->chooseDefaultSpan();
 
index 873a849..fff81bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
- *  Copyright 2006-2007 Adrian Thurston <thurston@cs.queensu.ca>
- *            2007 Victor Hugo Borja <vhborja@gmail.com>
+ *  Copyright 2007 Victor Hugo Borja <vic@rubyforge.org>
+ *            2007 Adrian Thurston <thurston@cs.queensu.ca>
  */
 
 /*  This file is part of Ragel.
index 1e72d7b..32bb236 100644 (file)
@@ -1,6 +1,6 @@
 /*
- *  Copyright 2006-2007 Adrian Thurston <thurston@cs.queensu.ca>
- *            2007 Victor Hugo Borja <vhborja@gmail.com>
+ *  Copyright 2007 Victor Hugo Borja <vic@rubyforge.org>
+ *            2006-2007 Adrian Thurston <thurston@cs.queensu.ca>
  */
 
 /*  This file is part of Ragel.