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
-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
/* 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() );
/*
- * Copyright 2001-2005 Adrian Thurston <thurston@cs.queensu.ca>
+ * Copyright 2001-2007 Adrian Thurston <thurston@cs.queensu.ca>
*/
/* This file is part of Ragel.
/* 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;
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 );
+ }
}
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();
/*
- * 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.
/*
- * 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.