From: thurston Date: Tue, 6 Feb 2007 04:38:39 +0000 (+0000) Subject: Updated Victor's email address. The frontend parameter check must accept -R. X-Git-Tag: 2.0_alpha~403 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=180fc07dc7ac32998536af949e444f6b4cb979e4;p=external%2Fragel.git Updated Victor's email address. The frontend parameter check must accept -R. 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 --- diff --git a/ChangeLog b/ChangeLog index ce7583c..cb72a28 100644 --- 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 diff --git a/ragel/fsmbase.cpp b/ragel/fsmbase.cpp index 96b3488..f1d7141 100644 --- a/ragel/fsmbase.cpp +++ b/ragel/fsmbase.cpp @@ -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() ); diff --git a/ragel/main.cpp b/ragel/main.cpp index ac90dd5..aacccc9 100644 --- a/ragel/main.cpp +++ b/ragel/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2005 Adrian Thurston + * Copyright 2001-2007 Adrian Thurston */ /* 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; diff --git a/rlcodegen/fsmcodegen.cpp b/rlcodegen/fsmcodegen.cpp index 652c05e..7ac1a5a 100644 --- a/rlcodegen/fsmcodegen.cpp +++ b/rlcodegen/fsmcodegen.cpp @@ -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(sbuf); - lineDirective( out, filter->fileName, filter->line + 1 ); + if ( outputFormat == OutCode ) { + std::streambuf *sbuf = out.rdbuf(); + output_filter *filter = static_cast(sbuf); + lineDirective( out, filter->fileName, filter->line + 1 ); + } } diff --git a/rlcodegen/gvdotgen.cpp b/rlcodegen/gvdotgen.cpp index 721ec34..0f87a26 100644 --- a/rlcodegen/gvdotgen.cpp +++ b/rlcodegen/gvdotgen.cpp @@ -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(); diff --git a/rlgen-ruby/rubycodegen.cpp b/rlgen-ruby/rubycodegen.cpp index 873a849..fff81bf 100644 --- a/rlgen-ruby/rubycodegen.cpp +++ b/rlgen-ruby/rubycodegen.cpp @@ -1,6 +1,6 @@ /* - * Copyright 2006-2007 Adrian Thurston - * 2007 Victor Hugo Borja + * Copyright 2007 Victor Hugo Borja + * 2007 Adrian Thurston */ /* This file is part of Ragel. diff --git a/rlgen-ruby/rubycodegen.h b/rlgen-ruby/rubycodegen.h index 1e72d7b..32bb236 100644 --- a/rlgen-ruby/rubycodegen.h +++ b/rlgen-ruby/rubycodegen.h @@ -1,6 +1,6 @@ /* - * Copyright 2006-2007 Adrian Thurston - * 2007 Victor Hugo Borja + * Copyright 2007 Victor Hugo Borja + * 2006-2007 Adrian Thurston */ /* This file is part of Ragel.