From 7e13e5fc62b81ffc5728006ddb560478ac3f1576 Mon Sep 17 00:00:00 2001 From: Jinkun Jang Date: Wed, 13 Mar 2013 01:44:50 +0900 Subject: [PATCH] Tizen 2.1 base --- AUTHORS | 1 + CREDITS | 36 +- ChangeLog | 445 ++- DIST | 6 + Makefile.am | 19 + README | 50 +- TODO | 56 +- aapl/Makefile.am | 10 + aapl/avlbasic.h | 2 +- aapl/avlcommon.h | 10 +- aapl/avlibasic.h | 2 +- aapl/avlikeyless.h | 2 +- aapl/avlimap.h | 2 +- aapl/avlimel.h | 2 +- aapl/avlimelkey.h | 2 +- aapl/avliset.h | 2 +- aapl/avlitree.h | 2 +- aapl/avlkeyless.h | 2 +- aapl/avlmap.h | 2 +- aapl/avlmel.h | 2 +- aapl/avlmelkey.h | 2 +- aapl/avlset.h | 2 +- aapl/avltree.h | 2 +- aapl/bstcommon.h | 2 +- aapl/bstmap.h | 2 +- aapl/bstset.h | 2 +- aapl/bsttable.h | 2 +- aapl/bubblesort.h | 2 +- aapl/compare.h | 2 +- aapl/dlcommon.h | 2 +- aapl/dlist.h | 2 +- aapl/dlistmel.h | 2 +- aapl/dlistval.h | 2 +- aapl/insertsort.h | 2 +- aapl/mergesort.h | 2 +- aapl/quicksort.h | 2 +- aapl/resize.h | 2 +- aapl/sbstmap.h | 2 +- aapl/sbstset.h | 2 +- aapl/sbsttable.h | 2 +- aapl/svector.h | 78 +- aapl/table.h | 2 +- aapl/vector.h | 43 +- autogen.sh | 7 + configure.in | 100 +- contrib/Makefile.am | 2 + contrib/ragel.m4 | 43 + contrib/ragel.make | 6 + contrib/unicode2ragel.rb | 305 ++ debian/changelog | 347 +++ debian/compat | 1 + debian/control | 21 + debian/copyright | 27 + debian/docs | 2 + debian/examples | 1 + debian/manpages | 2 + debian/rules | 59 + debian/watch | 7 + doc/Makefile.am | 60 + doc/RELEASE_NOTES_V6 | 95 + doc/bmconcat.fig | 104 +- doc/bmnull.fig | 29 +- doc/bmnum.fig | 44 +- doc/bmor.fig | 52 +- doc/bmrange.fig | 44 +- doc/bmregex.fig | 137 +- doc/comments1.fig | 167 ++ doc/comments2.fig | 110 + doc/conds1.fig | 96 + doc/conds2.fig | 107 + doc/dropdown.fig | 107 + doc/entryguard.fig | 73 + doc/exaction.fig | 91 +- doc/exallact.fig | 59 +- doc/exconcat.fig | 292 +- doc/exdoneact.fig | 61 +- doc/exinter.fig | 109 +- doc/exnegate.fig | 69 +- doc/exoption.fig | 107 +- doc/exor.fig | 179 +- doc/exoutact1.fig | 62 + doc/exoutact2.fig | 78 + doc/explus.fig | 60 +- doc/exstact.fig | 87 +- doc/exstar.fig | 95 +- doc/exstrongsubtr.fig | 149 +- doc/exsubtr.fig | 214 +- doc/extract.awk | 41 + doc/finguard.fig | 119 + doc/fixbackbox.awk | 10 + doc/genfigs.sh | 18 + doc/leftguard.fig | 94 + doc/lines1.fig | 164 + doc/lines2.fig | 121 + doc/lmkleene.fig | 116 + doc/opconcat.fig | 46 +- doc/opor.fig | 48 +- doc/opstar.fig | 62 +- doc/ragel-guide.tex | 3895 +++++++++++++++--------- doc/ragel.1.in | 141 +- doc/smallscanner.fig | 78 + examples/Makefile.am | 91 + examples/atoi.rl | 59 + examples/awkemu.rl | 116 + examples/awkequiv.awk | 10 + examples/clang.rl | 150 + examples/concurrent.rl | 126 + examples/cppscan.lex | 143 + examples/cppscan.rec | 183 ++ examples/cppscan.rl | 208 ++ examples/format.rl | 191 ++ examples/gotocallret.rl | 96 + examples/mailbox.rl | 207 ++ examples/params.rl | 102 + examples/pullscan.rl | 170 ++ examples/rlscan.rl | 300 ++ examples/statechart.rl | 116 + examples/uri.rl | 31 + packaging/no-doc.patch | 11 + packaging/ragel.spec | 46 + ragel-d.vim | 156 + ragel-java.vim | 151 + ragel-m.vim | 154 + ragel.vim | 40 +- ragel/Makefile.am | 52 + ragel/buffer.h | 55 + ragel/cdcodegen.cpp | 856 ++++++ ragel/cdcodegen.h | 223 ++ ragel/cdfflat.cpp | 384 +++ ragel/cdfflat.h | 75 + ragel/cdfgoto.cpp | 296 ++ ragel/cdfgoto.h | 75 + ragel/cdflat.cpp | 851 ++++++ ragel/cdflat.h | 108 + ragel/cdftable.cpp | 436 +++ ragel/cdftable.h | 77 + ragel/cdgoto.cpp | 801 +++++ ragel/cdgoto.h | 109 + ragel/cdipgoto.cpp | 444 +++ ragel/cdipgoto.h | 95 + ragel/cdsplit.cpp | 526 ++++ ragel/cdsplit.h | 70 + ragel/cdtable.cpp | 1096 +++++++ ragel/cdtable.h | 114 + ragel/common.cpp | 355 +++ ragel/common.h | 378 +++ ragel/cscodegen.cpp | 817 +++++ ragel/cscodegen.h | 205 ++ ragel/csfflat.cpp | 389 +++ ragel/csfflat.h | 55 + ragel/csfgoto.cpp | 296 ++ ragel/csfgoto.h | 55 + ragel/csflat.cpp | 884 ++++++ ragel/csflat.h | 91 + ragel/csftable.cpp | 438 +++ ragel/csftable.h | 56 + ragel/csgoto.cpp | 801 +++++ ragel/csgoto.h | 89 + ragel/csipgoto.cpp | 438 +++ ragel/csipgoto.h | 75 + ragel/cssplit.cpp | 518 ++++ ragel/cssplit.h | 53 + ragel/cstable.cpp | 1117 +++++++ ragel/cstable.h | 102 + ragel/dotcodegen.cpp | 319 ++ ragel/dotcodegen.h | 48 + ragel/fsmap.cpp | 64 +- ragel/fsmattach.cpp | 4 +- ragel/fsmbase.cpp | 167 +- ragel/fsmgraph.cpp | 87 +- ragel/fsmgraph.h | 214 +- ragel/fsmmin.cpp | 14 +- ragel/fsmstate.cpp | 43 +- ragel/gendata.cpp | 1016 +++++++ ragel/gendata.h | 186 ++ ragel/inputdata.cpp | 244 ++ ragel/inputdata.h | 104 + ragel/javacodegen.cpp | 1683 +++++++++++ ragel/javacodegen.h | 197 ++ ragel/main.cpp | 431 ++- ragel/parsedata.cpp | 442 +-- ragel/parsedata.h | 216 +- ragel/parsetree.cpp | 246 +- ragel/parsetree.h | 89 +- ragel/pcheck.h | 48 + ragel/ragel.h | 76 +- ragel/rbxgoto.cpp | 831 ++++++ ragel/rbxgoto.h | 97 + ragel/redfsm.cpp | 583 ++++ ragel/redfsm.h | 530 ++++ ragel/rlparse.cpp | 6235 +++++++++++++++++++++++++++++++++++++++ ragel/rlparse.h | 210 ++ ragel/rlparse.kh | 75 +- ragel/rlparse.kl | 227 +- ragel/rlscan.cpp | 7218 +++++++++++++++++++++++++++++++++++++++++++++ ragel/rlscan.h | 132 + ragel/rlscan.rl | 1076 ++++--- ragel/rubycodegen.cpp | 826 ++++++ ragel/rubycodegen.h | 174 ++ ragel/rubyfflat.cpp | 488 +++ ragel/rubyfflat.h | 65 + ragel/rubyflat.cpp | 871 ++++++ ragel/rubyflat.h | 99 + ragel/rubyftable.cpp | 563 ++++ ragel/rubyftable.h | 64 + ragel/rubytable.cpp | 1033 +++++++ ragel/rubytable.h | 124 + ragel/xmlcodegen.cpp | 1323 +++++++-- ragel/xmlcodegen.h | 111 +- ragel/xmlparse.kh | 209 ++ ragel/xmlparse.kl | 1006 +++++++ ragel/xmlscan.rl | 313 ++ ragel/xmltags.gperf | 94 + test/Makefile.am | 45 + test/atoi1.rl | 2 +- test/atoi2.rl | 2 +- test/atoi3.rl | 75 + test/awkemu.rl | 4 +- test/builtin.rl | 2 +- test/call1.rl | 2 - test/call2.rl | 4 +- test/call3.rl | 1 - test/checkeofact.txl | 95 + test/clang1.rl | 2 +- test/clang2.rl | 2 +- test/clang3.rl | 2 +- test/clang4.rl | 188 ++ test/cond1.rl | 7 +- test/cond2.rl | 6 +- test/cond3.rl | 6 +- test/cond5.rl | 6 +- test/cond6.rl | 6 +- test/cond7.rl | 82 + test/cppscan1.h | 4 +- test/cppscan1.rl | 13 +- test/cppscan2.rl | 36 +- test/cppscan3.rl | 30 +- test/cppscan4.rl | 3 +- test/cppscan5.rl | 16 +- test/cppscan6.rl | 358 +++ test/element1.rl | 12 +- test/element2.rl | 5 +- test/element3.rl | 2 +- test/eofact.rl | 3 +- test/erract1.rl | 4 +- test/erract2.rl | 12 + test/erract3.rl | 5 +- test/erract4.rl | 2 +- test/erract5.rl | 2 +- test/erract6.rl | 82 + test/erract7.rl | 42 + test/erract8.rl | 44 + test/erract9.rl | 43 + test/export1.rl | 59 + test/export2.rl | 57 + test/export3.rl | 53 + test/export4.rl | 59 + test/fnext1.rl | 81 + test/forder1.rl | 4 +- test/forder2.rl | 4 +- test/forder3.rl | 13 +- test/gotocallret1.rl | 1 + test/gotocallret2.rl | 4 +- test/high1.rl | 9 +- test/high2.rl | 1 - test/high3.rl | 1 - test/import1.rl | 73 + test/java1.rl | 1 - test/java2.rl | 1 - test/keller1.rl | 1 - test/langtrans_c.sh | 27 +- test/langtrans_c.txl | 48 +- test/langtrans_csharp.sh | 109 + test/langtrans_csharp.txl | 342 +++ test/langtrans_d.sh | 24 +- test/langtrans_d.txl | 35 +- test/langtrans_java.sh | 16 +- test/langtrans_java.txl | 52 +- test/langtrans_ruby.sh | 96 + test/langtrans_ruby.txl | 376 +++ test/lmgoto.rl | 28 +- test/mailbox1.h | 2 +- test/mailbox1.rl | 11 +- test/mailbox2.rl | 12 +- test/mailbox3.rl | 14 +- test/minimize1.rl | 4 +- test/patact.rl | 17 +- test/range.rl | 10 +- test/recdescent1.rl | 128 + test/recdescent2.rl | 116 + test/recdescent3.rl | 117 + test/repetition.rl | 4 +- test/rlscan.rl | 44 +- test/ruby1.rl | 56 + test/runtests.in | 313 ++ test/scan1.rl | 64 + test/scan2.rl | 34 + test/scan3.rl | 32 + test/scan4.rl | 33 + test/statechart1.rl | 4 +- test/strings1.rl | 4 +- test/strings2.rl | 8 +- test/testcase.txl | 24 +- test/tokstart1.rl | 171 +- test/union.rl | 5 +- test/xml.rl | 1 - 306 files changed, 56802 insertions(+), 4223 deletions(-) create mode 100644 AUTHORS create mode 100644 DIST create mode 100644 Makefile.am create mode 100644 aapl/Makefile.am create mode 100755 autogen.sh create mode 100644 contrib/Makefile.am create mode 100644 contrib/ragel.m4 create mode 100644 contrib/ragel.make create mode 100644 contrib/unicode2ragel.rb create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/examples create mode 100644 debian/manpages create mode 100755 debian/rules create mode 100644 debian/watch create mode 100644 doc/Makefile.am create mode 100644 doc/RELEASE_NOTES_V6 create mode 100644 doc/comments1.fig create mode 100644 doc/comments2.fig create mode 100644 doc/conds1.fig create mode 100644 doc/conds2.fig create mode 100644 doc/dropdown.fig create mode 100644 doc/entryguard.fig create mode 100644 doc/exoutact1.fig create mode 100644 doc/exoutact2.fig create mode 100644 doc/extract.awk create mode 100644 doc/finguard.fig create mode 100644 doc/fixbackbox.awk create mode 100755 doc/genfigs.sh create mode 100644 doc/leftguard.fig create mode 100644 doc/lines1.fig create mode 100644 doc/lines2.fig create mode 100644 doc/lmkleene.fig create mode 100644 doc/smallscanner.fig create mode 100644 examples/Makefile.am create mode 100644 examples/atoi.rl create mode 100644 examples/awkemu.rl create mode 100755 examples/awkequiv.awk create mode 100644 examples/clang.rl create mode 100644 examples/concurrent.rl create mode 100644 examples/cppscan.lex create mode 100644 examples/cppscan.rec create mode 100644 examples/cppscan.rl create mode 100644 examples/format.rl create mode 100644 examples/gotocallret.rl create mode 100644 examples/mailbox.rl create mode 100644 examples/params.rl create mode 100644 examples/pullscan.rl create mode 100644 examples/rlscan.rl create mode 100644 examples/statechart.rl create mode 100644 examples/uri.rl create mode 100644 packaging/no-doc.patch create mode 100644 packaging/ragel.spec create mode 100644 ragel-d.vim create mode 100644 ragel-java.vim create mode 100644 ragel-m.vim create mode 100644 ragel/Makefile.am create mode 100644 ragel/buffer.h create mode 100644 ragel/cdcodegen.cpp create mode 100644 ragel/cdcodegen.h create mode 100644 ragel/cdfflat.cpp create mode 100644 ragel/cdfflat.h create mode 100644 ragel/cdfgoto.cpp create mode 100644 ragel/cdfgoto.h create mode 100644 ragel/cdflat.cpp create mode 100644 ragel/cdflat.h create mode 100644 ragel/cdftable.cpp create mode 100644 ragel/cdftable.h create mode 100644 ragel/cdgoto.cpp create mode 100644 ragel/cdgoto.h create mode 100644 ragel/cdipgoto.cpp create mode 100644 ragel/cdipgoto.h create mode 100644 ragel/cdsplit.cpp create mode 100644 ragel/cdsplit.h create mode 100644 ragel/cdtable.cpp create mode 100644 ragel/cdtable.h create mode 100644 ragel/common.cpp create mode 100644 ragel/common.h create mode 100644 ragel/cscodegen.cpp create mode 100644 ragel/cscodegen.h create mode 100644 ragel/csfflat.cpp create mode 100644 ragel/csfflat.h create mode 100644 ragel/csfgoto.cpp create mode 100644 ragel/csfgoto.h create mode 100644 ragel/csflat.cpp create mode 100644 ragel/csflat.h create mode 100644 ragel/csftable.cpp create mode 100644 ragel/csftable.h create mode 100644 ragel/csgoto.cpp create mode 100644 ragel/csgoto.h create mode 100644 ragel/csipgoto.cpp create mode 100644 ragel/csipgoto.h create mode 100644 ragel/cssplit.cpp create mode 100644 ragel/cssplit.h create mode 100644 ragel/cstable.cpp create mode 100644 ragel/cstable.h create mode 100644 ragel/dotcodegen.cpp create mode 100644 ragel/dotcodegen.h create mode 100644 ragel/gendata.cpp create mode 100644 ragel/gendata.h create mode 100644 ragel/inputdata.cpp create mode 100644 ragel/inputdata.h create mode 100644 ragel/javacodegen.cpp create mode 100644 ragel/javacodegen.h create mode 100644 ragel/pcheck.h create mode 100644 ragel/rbxgoto.cpp create mode 100644 ragel/rbxgoto.h create mode 100644 ragel/redfsm.cpp create mode 100644 ragel/redfsm.h create mode 100644 ragel/rlparse.cpp create mode 100644 ragel/rlparse.h create mode 100644 ragel/rlscan.cpp create mode 100644 ragel/rlscan.h create mode 100644 ragel/rubycodegen.cpp create mode 100644 ragel/rubycodegen.h create mode 100644 ragel/rubyfflat.cpp create mode 100644 ragel/rubyfflat.h create mode 100644 ragel/rubyflat.cpp create mode 100644 ragel/rubyflat.h create mode 100644 ragel/rubyftable.cpp create mode 100644 ragel/rubyftable.h create mode 100644 ragel/rubytable.cpp create mode 100644 ragel/rubytable.h create mode 100644 ragel/xmlparse.kh create mode 100644 ragel/xmlparse.kl create mode 100644 ragel/xmlscan.rl create mode 100644 ragel/xmltags.gperf create mode 100644 test/Makefile.am create mode 100644 test/atoi3.rl create mode 100644 test/checkeofact.txl create mode 100644 test/clang4.rl create mode 100644 test/cond7.rl create mode 100644 test/cppscan6.rl create mode 100644 test/erract6.rl create mode 100644 test/erract7.rl create mode 100644 test/erract8.rl create mode 100644 test/erract9.rl create mode 100644 test/export1.rl create mode 100644 test/export2.rl create mode 100644 test/export3.rl create mode 100644 test/export4.rl create mode 100644 test/fnext1.rl create mode 100644 test/import1.rl create mode 100755 test/langtrans_csharp.sh create mode 100644 test/langtrans_csharp.txl create mode 100755 test/langtrans_ruby.sh create mode 100644 test/langtrans_ruby.txl create mode 100644 test/recdescent1.rl create mode 100644 test/recdescent2.rl create mode 100644 test/recdescent3.rl create mode 100644 test/ruby1.rl create mode 100755 test/runtests.in create mode 100644 test/scan1.rl create mode 100644 test/scan2.rl create mode 100644 test/scan3.rl create mode 100644 test/scan4.rl diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..7ca82d0 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +See CREDITS. diff --git a/CREDITS b/CREDITS index d0b5355..2d8bac7 100644 --- a/CREDITS +++ b/CREDITS @@ -2,24 +2,40 @@ Ragel State Machine Compiler -- CREDITS ======================================= -* Written by Adrian Thurston . -* Objective-C output contributed by Eric Ocean. +* Ragel was designed and written by Adrian Thurston . + +Many others have helped out along the way. My apolgies to anyone who has been +missed. + +* Many thanks to Arbor Networks for supporting development of Ragel. + +* Objective-C output and valuable feedback contributed by Erich Ocean. * D output and many great ideas contributed by Alan West. * Conditionals inspired by David Helder. * Java code generation contributions, bug reports, fixes, test cases - and suggestions from Colin Fleming + and suggestions from Colin Fleming. + +* Useful discussions and bug reports due to Carlos Antunes. + +* Ruby code generation contributed by Victor Hugo Borja. -* Useful discussion and bug from Carlos Antunes. +* C# code generation contributed by Daniel Tang. * Feedback, Packaging, and Fixes provided by: - Bob Tennent, Robert Lemmen, Tobias Jahn, Cris Bailiff, Buddy Betts, Scott - Dixon, Steven Handerson, Michael Somos, Bob Paddock, Istvan Buki, David - Drai, Matthias Rahlf, Zinx Verituse, Markus W. Weissmann, Marc Liyanage, - Eric Ocean, Alan West, Steven Kibbler, Laurent Boulard, Jon Oberheide, - David Helder, Lexington Luthor, Jason Jobe, Colin Fleming, Carlos Antunes, - Steve Horne + Bob Tennent, Robert Lemmen, Tobias Jahn, Cris Bailiff, Buddy Betts, + Scott Dixon, Steven Handerson, Michael Somos, Bob Paddock, Istvan Buki, + David Drai, Matthias Rahlf, Zinx Verituse, Markus W. Weissmann, + Marc Liyanage, Erich Ocean, Alan West, Steven Kibbler, Laurent Boulard, + Jon Oberheide, David Helder, Lexington Luthor, Jason Jobe, Colin Fleming, + Carlos Antunes, Steve Horne, Matt Mower, Josef Goettgens, Zed Shaw, + Marcus Rueckert, Jeremy Hinegardner, Aaron Campbell, Josh Purinton, + Judson Lester, Barry Arthur, Tim Potter, Ryan Phelps, David Waite, + Kenny MacDermid, MenTaLguY, Manoj Rajagopalan, Tim Chklovski, + Mikkel Fahnøe Jørgensen, Andrei Polushin, Evan Phoenix, David Balmain, + Ross Thomas, Mitchell Foral, John D. Mitchell, Diego 'Flameeyes' Pettenò, + Jose Quinteiro, William Morgan, _why, Iñaki Baz Castillo diff --git a/ChangeLog b/ChangeLog index 83795a6..c9c455b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,427 @@ -For Next Release -================ +Ragel 6.6 - Dec 2, 2009 +======================= + -Applied a number of patches from Diego Elio 'Flameeyes' Pettenò. Should not + be modifying the program's arguments. Problem raised by const correctness in + gcc 4.4. Other const-correctness and include fixes provided. + -Fixed improper allocation of checks in makeIncludePathChecks. + -Fixed segfault when there are no machine instantiations. + -Fixed wrong line directives. Line directives need to use the fileName stored + in the InputLoc stuctures from the parse trees, not the root source file, + otherwise actions in included files will have the wrong source file names + associated with the text. + -Made a number of build system improvements. We locate the DIST file using + $srcdir and source it. It contains settings for build_parsers and + build_manual. This allows the user of a dist to enable only one. + -Added missing files to doc/Makefile.am and examples/Makefile.am. + -Added checks for pdflatex and fig2dev is build_manual is on. + -Use automake --foreign so we don't need to have INSTALL and NEWS present. + -Ragel VIM syntax files should be specialized by host language. Updated the + VIM syntax files. + -Just discovered that $srcdir is available in the configure script for + checking for the existence of a file created by dist-hook. This lets us write + a test that knows the difference between a distribution tarball and something + from the repos. The building of the parsers and the manual can now be + automatically turned off in a make dist tarball. + -Added examples to the dist. Added unicode2ragel.rb to EXTRA_DIST in contrib. + -Moved unicode2ragel.rb to the contrib directory. + +Ragel 6.5 - May 18, 2009 +======================== + -Fixed a bug in graphviz generation. Ragel crashed when using -V and -M and + the specified machine referenced another machine that wasn't included in the + build. + -The name "CS" is in use on OpenSolaris, changed to vCS to ease compiling + Ragel there. + -Converted to automake. + -REALLY fixed a bug that was intended to be fixed in 6.4: + Fixed a problem reading hex numbers that have the high bit set when the + alphabet is signed and we are on 64 bit. This was reported by _why. The + fix was provided by Wialliam Morgan. The literal 0xffffffff was used for + a fully set long when -1L should be used instead. + A null patch (whitespace changes) must have gotten checked after I was + testing with and without the critical one-line patch and I forgot to enable + make sure it was enabled in the final checkin version. + +Ragel 6.4 - Mar 22, 2009 +======================== + -Moved back to a single executable. The old intermediate format can still be + generated using the -x option. Ragel was split into frontend and backend + programs in version 5.0. This was done to encourage interoperability with + other tools. Since then, ragel has been made to work with qfsm, with ragel + producing the intermediate format and qfsm consuming it. However, there has + been no use of Ragel as a consumer of state machine data, with Ragel used as + a code generator for DFAs. This is not surprising given that much of the + complexity of Ragel is in the frontend, where the regular language to DFA + compilation happens. Since the full benefits of the split have not + materialized, and the split increases the complexity for users, Ragel has + been made once again into a single executable. + -Applied a fix to the documentation Makefile from John D. Mitchell. + -Use CXXFLAGS instead of CFLAGS for C++ compiling. Patch from Diego + 'Flameeyes' Pettenò. + -Added support for DESTDIR variable. Patch from Diego 'Flameeyes' Pettenò. + -Added a script called unicode2ragel.rb for generating unicode machines to + the examples directory. From Rakan El-Khalil. + -Fixed a copy-paste error in the documentation that was reported by Jose + Quinteiro. + -Added three new write commands: + write start; + write first_final; + write error; + These generate a reference to the start, first final and error state. When + there are many different machine specifications in one file it is easy to + get the prefix for these wrong (especially when you do a lot of copy-pasting + of boilerplate). The problem can be avoided by using write commands. + -Fixed a problem reading hex numbers that have the high bit set when the + alphabet is signed and we are on 64 bit. This was reported by _why. The fix + was provided by Wialliam Morgan. The literal 0xffffffff was used for a fully + set long when -1L should be used instead. + +Ragel 6.3 - Aug 29, 2008 +======================== + -Fixed an assertion that is too strong. In the condition code we need to copy + transitions that have non-empty lmActionTable arrays so we don't assert + emptiness in the constructor. Lift out the assertion and copy the array in + the constructor. + -Fixed and improved multiple include prevention. We now track the entire + include history of a parser state to prevent duplicates. + -Fixed crash on failed lookup of goto/call/etc target. + +Ragel 6.2 - May 9, 2008 +======================= + -Bug fix: The lm_switch actions needs to set p from tokend when there is no + user action. + -Bug fix: when not using indicies we can't use a transitions's id to identify + the eof transition to take. Instead add the transition to the end of the + transition list and store its position in a new var called pos. The pos var + is then used as the index. + -Bug fix: an fnext followed by an fbreak in -G2 was not working. The fbreak + was not aware that the fnext causes the cs variable to be forced active. In + this case fbreak does not need to save cs because it is already current. + -Bug fix: need to compute the low and high character-space keys from the + condition-trans overlap when computing an expansion. Can't use the range + supplied from the condition overlap since they may not match. An incorrect + machine that accepted 1(!cond1, !cond2) was generated for the following + grammar. This bug was reported by Tim Chklovski. + c = 2 @matched_c; + sc1 = 1..2 when cond1; + sc2 = 1..2 when cond2; + main := sc1 | c | sc2; + -Bug fix: error messages in start label analysis of join operations were + causing assertion failures because location info was not set. Fixed by + adding locations. + -Include and import file searching now searches for the file name given based + on the location of the current file, not ragel's current path. + Additional search locations can be given using the -I option. + -Rubinius code generation was updated to the latest Rubinius. Patch from Evan + Phoenix. + -Switched from strcasecmp to strcmp for testing long arguments. + -Applied a patch from Andrei Polushin for setting the error message format. + --error-format=gnu (default) + --error-fromat=msvc + -Now using the _WIN32 define instead of _WIN32. Other MSVC compilation + improvments from Andrei Polushin. + -Added the hyperref package to the manual. + +Ragel 6.1 - Mar 26, 2008 +======================== + -Scanners now ensure that any leaving actions at the end of a pattern are + executed. They are always executed before the pattern action. + -Added an option -d for turning off the removal of duplicate actions from + actions lists. + -Need to unset the final state status of the start state in kleene star if it + is set. It is possible to crash ragel when the warning is ignored. + -In the dot file generation we need to print any actions that are in + State::eofTrans. These come from scanners only. + -Use @docdir@ for the docdir Makefile variable. + -Check for ar and ranlib in the configure script. + +Ragel 6.0 - Jan 12, 2008 +======================== + -Removed the 'noend' write option from examples/atoi.rl. This example is + referenced a lot as a first example and as such it shouldn't contain a + special purpose write option like 'noend'. + -Introcuded the "eof" variable for indicating the end of file. The p variable + is checked against eof when the processing loop reaches the end of a block. + If p == eof at this time then the EOF actions are executed. The variable is + required only when EOF actions have been emebedded. + -The "write eof" command is no longer needed and was removed. + -Scanners now use EOF actions to generate tokens. This eliminates the need to + flush the last token. + -Restructured the Java driver; a switch statement with fallthrough cases are + now used to emulate gotos. + -Ruby code generation was also restructured. Gotos are elmulated using a + series of if tests. + -Went back to 3.X semantics for >, % and error actions. The > operator also + embeds a leaving action/priority into the start state if it is final. If EOF + happens in a state with a leaving operator then the leaving action is + executed. If EOF happens in a non-final state that has an error action, the + error action is executed. + -The "ragel" program now executes frontend and backend processes separately, + connecting them with a temporary file in the current directory. Without the + -x option the "ragel" program marshals arguments and calls the frontend and + backend. With the -x option the "ragel" program acts as the frontend only. + -Added name finding for executables. If any forward slash is found in argv0 + then it is assumed that the path is explicit and the path to the backend + executable should be derived from that. Whe check that location and also go + up one then inside a directory of the same name in case we are executing + from the source tree. If no forward slash is found it is assumed the file is + being run from the installed location. The PREFIX supplied during + configuration is used. + -On windows GetModuleFileNameEx is used to find out where the the current + process's binary is. That location is searched first. If that fails then we + go up one directory and look for the executable inside a directory of the + same name in case we are executing from the source tree. + -Changed the -l option in rlgen-cd to -L because it is covered in the + frontend. Added a passthrough in the frontend for the backend options. + -Dot file generation can now be invoked using the -V option to ragel. We + now require an input file. If standard in is used then we don't have a file + name on which to base the output. + -Able to build native windows executables using Cygwin+MinGW. + -Patch from David Waite: Large arrays are now created by copying in the data + from smaller arrays using System.arraycopy(). This eliminates the debug data + associated with explicit initialization statements. It is also much easier + on the java compiler which can run out of memory compiling very large + machines. The downside is that it takes slightly longer to initialize static + data at run time. + -The fbreak statement now advances p. + -In the :> :>> and <: operators it was possible for the priority assignment + to be bypassed via the zero length string. In :> this was fixed + automatically with the semantics change to the entering priority operator. + If the start state is final it now embeds a leaving action into it, + preventing persistance through the zero length string. In :>> and <: this + was fixed explicitly. With <: the entering priority operator was used and + with :> a special exception was added. Since it uses the finishing + transition operator it also adds a leaving priority to the start state if it + is final. + -Ranlib is now run on the archives. Patch from Kenny MacDermid. + -The case statement syntax in ruby code generation used a form depreciated in + Ruby 1.9. Updated it. + -Made a number of fixes that eliminate warnings in GCC 4.3. Mostly concern + the now depreciate automatic conversion of string contsants to "char*" type. + Other fixes include adding parenthesis around && within ||. + -The "tokstart" and "tokend" variables were changed to "ts" and "te". + +Ragel 5.25 - Dec 24, 2007 +========================= + -Fixed segfault reported by Ryan Phelps. Affected Java and Ruby code + generation. The dataExpr variable was not initialized. + -Fixed incorrect case label in test/runtests. Caused Objective-C tests to be + ignored. + -Added missing include to common.cpp. + +Ragel 5.24 - Sep 16, 2007 +========================= + -Applied patch from Victor Hugo Borja . This patch + implements -T1 -F0 -F1 and -G0 in the ruby code generator. Goto-driven code + generation is experimental and requires rubinius asm directives (specify + with --rbx option). These code generators pass all the ruby tests. + -If the condition embedding code runs out of available characters in the + keyspace an error message is emitted. + -The first example that appeared in the manual used the special-purpose + 'noend' write option. This caused confusion. Now a basic example appears + first. + -Added two new statements: prepush and postpop. These are code blocks that + are written out during call and return statements. The prepush code is + written immediately before pushing the current state to the state stack + during a call. The postpop code is written immediately after popping the + current state during return. These can be used to implement a dynamically + resizable stack. + +Ragel 5.23 - Jul 24, 2007 +========================= + -Eliminated the use of callcc as an alternative to goto. Instead, the named + breaks implementation used in the Java code generator is imitated using + control flow variables. + -Improved the error message given when there is a write statement but no + machine instantiations and hence no state machine. + -Documentation improvements: updates to "Machine Instantiation", "Write Init" + and "Write Exports" sectons. Added the "Variables Used by Ragel" section. + -Renamed "Entering Actions" to "Starting Actions." + -Other documentation updates. + +Ragel 5.22 - June 14, 2007 +========================== + -Bug fix: need to isolate the start state of a scanner before setting the + to-state and from-state actions which clear and set tokstart. This affected + very simple scanners only. Most scanners have an isolated start state due to + the pattern structure. + -Bug fix: when -S or -M was given the ragel version number was not emitted, + causing the backend to reject the intermediate format. From Tim Potter. + -The p varialbe is now set up at the beginning of a scanner action, rather + than at the end. This leaves scanner actions free to manipulate p and + removes the need for the special holdTE and execTE (TE for tokend) versions + of hold and exec. It also removes the need to set p = tokend-1 immediately + before any control flow. We loose the ability to determine where in the + input stream a scanner action is executed, however this information is of + little use because it is primarily an artifact of the scanner implementation + (sometimes the last char, other times later on). The gains of this change + are consistency and simplicity. + -The "data" variable (used in Java and Ruby code generation only) can now be + overridden using the variable statement. + +Ragel 5.21 - May 9, 2007 +======================== + -Fixed an inconsistency in the value of p following an error. In the C + directly executable code (rlgen-cd -G2) p is left at the character where + the error occurred, which is correct. In all other code generators it was + left at the following character. This was fixed. Now in all code generators + p is left at the character where the error occurred. + -Bug fix: when fhold was used in scanner pattern actions which get executed + on the last character of the pattern (pattern matches which do not require + any lookahead), fhold was modifying p instead of tokend. This was fixed and + the patact.rl test was modified to cover the case. + -Fixed typos in the guide, improved the state action embedding operator + section and added subsections on the variable, import, and export + statements. + -Implemented a better solution than the pri hack for resolving the '-' + ambiguity: force a shortest match of term. + -Fixed bugs in the binary searching for condition keys in both the Ruby and + Java code generation. + -Can now embed the negative sense of a condition. Added a language- + independent test case for this feature and the necessary transformation + support. + -Added new condition embedding syntax: + expr inwhen cond - The transitions into the machine (starting transitions). + expr outwhen cond - The pending transitions out of the machine. + -The argument to the variable statement which affects the name of the current + state variable was changed from "curstate" to "cs" (the default name used + for the current state) + -Implemented the other variables names in the variable statement. Now all + variables (p, pe, cs, top, stack, act, tokstart, tokend) can be renamed. + -Parse errors in the intermediate XML file now cause the backend to exit + immediately rather then forge on. The recovery infrastructure isn't there + and segfaults are likely. + -When no input is given to the backend program, it should not print an error + message, it should just return a non-zero exit status. The assumption is + that the frontend printed an error. + -The version number is now included in the intermediate file. An error is + emitted if there is a mismatch. + -The alphabet type is now communicated from the frontend to the backend using + a one-word internal name instead of an array offset. + -The Ruby host language types had been just copied from Java. Reduced them to + two basic types: char and int, both signed with the usual C sizes. + +Ragel 5.20 - Apr 7, 2007 +======================== + -The cs variable is now always initialized, unless the "nocs" option is given + to the write init command. If there is no main machine, cs is initialized to + the entry point defined by the last machine instantiation. + -A number of fixes were made to the Ruby code generator. + -The frontend now scans ruby comments and regular expressions. + -A transformation for Ruby was added to the language-independent test suite. + The Ruby code generator passes on all the language-independent tests. + -A new Ruby test and two language-independent tests were added. + -Some portability fixes were made (Patches from Josef Goettgens and Aaron + Campbell). + -Fixed a make dependency bug which caused a problem for parallel building + (Patch from Jeremy Hinegardner). + +Ragel 5.19 - Mar 14, 2007 +========================= + -Added an import statement to ragel. This statement takes a literal string as + an argument, interprets it as a file name, then scrapes the file for + sequences of tokens that match the following forms. Tokens inside ragel + sections are ignored. An example is in test/import1.rl + name = number + name = lit_string + "define" name number + "define" name lit_string + -Added an export mechanism which writes defines for single character machines + that have been tagged with the export keyword in their definition. Defines + are used for C, ints for D, Java and Ruby. Examples of the export feature + are in test/export*.rl. + -All machine instantiations are now always generated, even if they are not + referenced. In the backend, entry points for all instantiations are written + out alongside start, error and first final states. + -If the main machine is not present then do not emit an error. Generate the + machine without a start state and do not initialize cs in the write init + code. + -Added an option -l to rlgen-cd which inhibits the writing of #line + directives. + -Added a new syntax for verbose embeddings. This adds parentheses: + $from(action_name); + Verbose embeddings without parentheses can make code difficult to read + because they force a space in the middle of an action embedding. There is a + tendency to associtate spaces with concatenation. Without syntax + highlighting to make it clear that the embedding type is a keyword, the + problem is especially bad. The danger is that a verbose embedding could be + read as an embedding of the keyword representing the empbedding type. With + parentheses, verbose embeddings read much more clearly. + -Conditions now have a forced order when more than one is executed on a + single character. Previously ordering relied on pointers, which caused + results to vary by compiler. Ordering is now done using conditon action + declaration order. This fixes the failure of cond4.rl which occured with + g++ 4.1 and other compiler versions. + -In the port from flex to ragel, the name separator :: in Ragel code was + lost. Added it back. + -In the examples directory switched from rlcodegen to rlgen-cd. Silenced a + warning in statechart.rl. + -In the root makefile the distclean target was fixed. It was calling clean in + the subdirs. In docs, the clean target was not deleting the new manpages for + the rlgen-* programs. Fixed. + -Portability and other fixes from Josef Goettgens were applied. + -The @datadir@ and @mandir@ variables are made use of in doc/Makefile.in for + specifying where documentation should be installed. Patch from Marcus + Rueckert. + +Ragel 5.18 - Feb 13, 2007 +========================= + -There is now a 100% correspondence between state id numbers in the + intermediate XML file, Graphviz dot files and generated code. This was + achieved by moving code which determines if the error state is necessary + into the frontend, and then assigning state numbers before writing out the + intermediate file. + -Backened class structure was reorganized to make it easier to add new code + generators without having to also modify the existing code generators. + -The C and D code generation executable was changed to rlgen-cd. + -The Java code generation was split out into it's own exectuable (rlgen-java) + to allow it to freely diverge from the C/D-based code generation. + -The graphviz dot file generation was also split out to it's own executable + (rlgen-dot). + -The Ruby code generation patch from Victor Hugo Borja was added. This is + highly experimental code and is not yet completely functional. It is in the + executable rlgen-ruby. + -The problem with large state machine machines in Java was fixed. This + problem was discovered by Colin Fleming, who also contributed a patch. + Rather than specify arrays as comma-separated lists of literals, array + initialization is now done in a static function. This is the approach used + by the Java compiler. Unlike the compiler Ragel is careful split large + initilization functions. + -The manual was expanded and reorganized somewhat. + -Eliminated per-example directories in examples/. + -Made some fixes to the pullscan.rl example. + -In the frontend CR characters are now treated as whitespace. + -Updated to the latest aapl. This completely eliminates the shallowCopy + function. With that, a definitive memory leak is fixed. + -Control codes with escape sequences are now printable characters (-p + option). Also, the space character is now printed as SP. + -Fixed the null dereference and consequential segfault which occurred when + trying to create empty machines with [] and // and /a[]b/. + -Fixed the segfault which occured when a machine reference failed. + -Discontinuing ragel.spec. It is more appropriate for this to be written by + package maintenance developers. + +Ragel 5.17 - Jan 28, 2007 +========================= + -The scanners and parsers in both the frontend and backend programs were + completely rewritten using Ragel and Kelbt. -The '%when condition' syntax was functioning like '$when condition'. This was fixed. - + -In the Vim syntax file fixes to the matching of embedding operators were + made. Also, improvements to the sync patterns were made. + -Added pullscan.rl to the examples directory. It is an example of doing + pull-based scanning. Also, xmlscan.rl in rlcodegen is a pull scanner. + -The introduction chapter of the manual was improved. The manually-drawn + figures for the examples were replaced with graphviz-drawn figures. + Ragel 5.16 - Nov 20, 2006 ========================= - -Bug fix: the fhold and fexec directives did not function correctly in + -Policy change: the fhold and fexec directives did not function correctly in scanner pattern actions. In this context manipulations of p may be lost or - made invalid. To fix this, fexec and fhold now manipulate tokend, which is - now always used to update p when the action terminates. + made invalid. In the previous version of Ragel they were banned because of + this. Instead of banning these directives they have been fixed. The fexec + and fhold directives now manipulate tokend, which is now always used to + update p when the action terminates. Ragel 5.15 - Oct 31, 2006 ========================= @@ -552,7 +965,7 @@ Ragel 3.7 - Oct 31, 2004 -Changed examples/cppscan to use fexec and thereby go much faster. -Implemented flex and re2c versions of examples/cppscan. Ragel version goes faster than flex version but not as fast as re2c version. - -Merged in Objective-C patch from Eric Ocean. + -Merged in Objective-C patch from Erich Ocean. -Turned off syncing with stdio in C++ tests to make them go faster. -Renamed C++ code generaion classes with the Cpp Prefix instead of CC to make them easier to read. @@ -708,7 +1121,7 @@ Ragel 3.4 - May 8, 2004 running of tests. Ragel 3.3 - Mar 7, 2004 -========================= +======================= -Portability bug fixes were made. Minimum and maximum integer values are now taken from the system. An alignment problem on 64bit systems was fixed. @@ -1056,8 +1469,8 @@ Ragel 1.3.1 - Oct 2, 2002 -A proper user guide was started. Chapter 1: Specifying Ragel Programs was written. It even has some diagrams :) -Ragel 1.3.0 - Sept 4, 2002 -========================== +Ragel 1.3.0 - Sep 4, 2002 +========================= -NULL keyword no longer used in table output. -Though not yet in use, underlying graph structure changed to support range transitions. As a result, most of the code that walks transition lists is now @@ -1117,8 +1530,8 @@ Ragel 1.2.0 - May 3, 2002 -If -e is given, but minimization is not turned on, print a warning. -Makefiles use automatic dependencies. -Ragel 1.1.0 - April 15, 2002 -============================ +Ragel 1.1.0 - Apr 15, 2002 +========================== -Added goto fsm: much faster than any other fsm style. -Default operator (if two machines are side by side with no operator between them) is concatenation. First showed up in 1.0.4. @@ -1147,8 +1560,8 @@ Ragel 1.1.0 - April 15, 2002 -Code generation section in docs. -Uses the latests aapl. -Ragel 1.0.5 - March 3, 2002 -=========================== +Ragel 1.0.5 - Mar 3, 2002 +========================= -Bugfix in SetErrorState that caused an assertion failure when compiling simple machines that did not have full transition tables (and thus did not show up on any example machines). Assertion failure did not occur @@ -1164,8 +1577,8 @@ Ragel 1.0.5 - March 3, 2002 -Started a README with compilation notes. Started an AUTHORS file. -Started the user documentation. Describes basic machines and operators. -Ragel 1.0.4 - March 1, 2002 -=========================== +Ragel 1.0.4 - Mar 1, 2002 +========================= -Ported to the version of Aapl just after 2.2.0 release. See http://www.ragel.ca/aapl/ for details on aapl. -Fixed a bug in the clang example: the newline machine was not stared. diff --git a/DIST b/DIST new file mode 100644 index 0000000..85d0524 --- /dev/null +++ b/DIST @@ -0,0 +1,6 @@ +#!/bin/sh + +# Change to yes to enable building of parsers or manual. Reconfigure +# afterwards. +build_parsers=no; +build_manual=no; diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..bbed893 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,19 @@ + +SUBDIRS = ragel doc +DIST_SUBDIRS = $(SUBDIRS) aapl contrib examples test + +dist_doc_DATA = CREDITS ChangeLog +EXTRA_DIST = ragel.vim + +# This file is checked for by the configure script and its existence causes the +# parsers and the manual to not be built when the distribution is built. +dist-hook: + ( \ + echo "#!/bin/sh"; \ + echo ""; \ + echo "# Change to yes to enable building of parsers or manual. Reconfigure"; \ + echo "# afterwards."; \ + echo "build_parsers=no;"; \ + echo "build_manual=no;"; \ + ) > $(distdir)/DIST + diff --git a/README b/README index f4a5817..d05b863 100644 --- a/README +++ b/README @@ -5,50 +5,28 @@ 1. Build Requirements --------------------- - * GNU Make + * Make * g++ If you would like to modify Ragel and need to build Ragel's scanners and -parsers from the specifications then set BUILD_PARSERS=true in the configure -script and then run it. To build the parsers you will need the following -programs: +parsers from the specifications then set "build_parsers=yes" the DIST file and +reconfigure. This variable is normally set to "no" in the distribution tarballs +and "yes" in version control. You will need the following programs: - * flex - * bison (recent version and not bison++, see below) - * gperf + * ragel (the most recent version) + * kelbt (the most recent version) -To build the user guide the following extra programs are needed: +To build the user guide set "build_manual=yes" in the DIST file and +reconfigure. You will need the following extra programs: * fig2dev * pdflatex +2. Compilation and Installation +------------------------------- -2. Compilation --------------- +Ragel uses autoconf and automake. -To configure type './configure'. The makefiles honour the --prefix option to -specify where the program is to be installed to. - -To build the ragel program type 'make'. - -To build all the documentation cd to 'doc' and type 'make'. If you don't have -all of the programs to build the user guide and just want the man page use -'make ragel.1 rlcodegen.1'. - - -3. Installing -------------- - -The command 'make install' will build the programs and install them to $PREFIX/bin/. -A 'make install' in the doc directory will make and install all the -documentation. The man pages install to $PREFIX/man/man1/ and the user guide -and ChangeLog install to $PREFIX/share/doc/ragel/. To install just the man page -use 'make man-install'. - - -4. Why Ragel cannot be built with Bison++ ------------------------------------------ -Ragel is written in C++ using a C-style parser. Bison++ sees that we are using -C++ and generates classes, which breaks the build. As of last investigation, -this can't be stopped. Bison++ is therefore only compatible with Bison if you -are implementing a C-style parser in C. +$ ./configure --prefix=PREFIX +$ make +$ make install diff --git a/TODO b/TODO index baf5c05..85c5440 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,59 @@ +Guard against including a ragel file more than once (newsgroup). + +Line numbers in included files refer to the master file. This needs to be +fixed -- from Manoj. + +Remove old action embedding and condition setting syntax. + fbreak should advance the current char. Depreciate fbreak and add fctl_break; fctl_return ; fctl_goto