From 176980c2b48c7284dfd634bb92f8217b4af55eb7 Mon Sep 17 00:00:00 2001 From: thurston Date: Sat, 15 Nov 2008 18:13:22 +0000 Subject: [PATCH] More renaming. git-svn-id: http://svn.complang.org/ragel/trunk@571 052ea7fc-9027-0410-9066-f65837a77df0 --- ragel/Makefile.in | 27 ++++++------- ragel/{cd-fsmcodegen.cpp => cd-codegen.cpp} | 18 ++++----- ragel/{cd-fsmcodegen.h => cd-codegen.h} | 0 ragel/{cd-fflatcodegen.cpp => cd-fflat.cpp} | 2 +- ragel/{cd-fflatcodegen.h => cd-fflat.h} | 2 +- ragel/{cd-fgotocodegen.cpp => cd-fgoto.cpp} | 2 +- ragel/{cd-fgotocodegen.h => cd-fgoto.h} | 2 +- ragel/{cd-flatcodegen.cpp => cd-flat.cpp} | 2 +- ragel/{cd-flatcodegen.h => cd-flat.h} | 2 +- ragel/{cd-ftabcodegen.cpp => cd-ftable.cpp} | 2 +- ragel/{cd-ftabcodegen.h => cd-ftable.h} | 2 +- ragel/{cd-gotocodegen.cpp => cd-goto.cpp} | 2 +- ragel/{cd-gotocodegen.h => cd-goto.h} | 2 +- ragel/{cd-ipgotocodegen.cpp => cd-ipgoto.cpp} | 2 +- ragel/{cd-ipgotocodegen.h => cd-ipgoto.h} | 2 +- ragel/{cd-splitcodegen.cpp => cd-split.cpp} | 2 +- ragel/{cd-splitcodegen.h => cd-split.h} | 2 +- ragel/{cd-tabcodegen.cpp => cd-table.cpp} | 2 +- ragel/{cd-tabcodegen.h => cd-table.h} | 2 +- ragel/{cs-fsmcodegen.cpp => cs-codegen.cpp} | 18 ++++----- ragel/{cs-fsmcodegen.h => cs-codegen.h} | 0 ragel/{cs-fflatcodegen.cpp => cs-fflat.cpp} | 2 +- ragel/{cs-fflatcodegen.h => cs-fflat.h} | 2 +- ragel/{cs-fgotocodegen.cpp => cs-fgoto.cpp} | 2 +- ragel/{cs-fgotocodegen.h => cs-fgoto.h} | 2 +- ragel/{cs-flatcodegen.cpp => cs-flat.cpp} | 2 +- ragel/{cs-flatcodegen.h => cs-flat.h} | 2 +- ragel/{cs-ftabcodegen.cpp => cs-ftable.cpp} | 2 +- ragel/{cs-ftabcodegen.h => cs-ftable.h} | 2 +- ragel/{cs-gotocodegen.cpp => cs-goto.cpp} | 2 +- ragel/{cs-gotocodegen.h => cs-goto.h} | 2 +- ragel/{cs-ipgotocodegen.cpp => cs-ipgoto.cpp} | 2 +- ragel/{cs-ipgotocodegen.h => cs-ipgoto.h} | 2 +- ragel/{cs-splitcodegen.cpp => cs-split.cpp} | 2 +- ragel/{cs-splitcodegen.h => cs-split.h} | 2 +- ragel/{cs-tabcodegen.cpp => cs-table.cpp} | 2 +- ragel/{cs-tabcodegen.h => cs-table.h} | 2 +- ragel/gendata.cpp | 43 +++++++++++++++++++++ ragel/parsedata.cpp | 2 +- ragel/{rbx-gotocodegen.cpp => rbx-goto.cpp} | 2 +- ragel/{rbx-gotocodegen.h => rbx-goto.h} | 0 ragel/ruby-codegen.cpp | 10 ++--- ragel/{ruby-fflatcodegen.cpp => ruby-fflat.cpp} | 2 +- ragel/{ruby-fflatcodegen.h => ruby-fflat.h} | 2 +- ragel/{ruby-flatcodegen.cpp => ruby-flat.cpp} | 2 +- ragel/{ruby-flatcodegen.h => ruby-flat.h} | 0 ragel/{ruby-ftabcodegen.cpp => ruby-ftable.cpp} | 2 +- ragel/{ruby-ftabcodegen.h => ruby-ftable.h} | 2 +- ragel/ruby-rlgen-ruby.h | 50 ------------------------- ragel/{ruby-tabcodegen.cpp => ruby-table.cpp} | 2 +- ragel/{ruby-tabcodegen.h => ruby-table.h} | 0 ragel/{xmlcodegen.cpp => xml-codegen.cpp} | 2 +- ragel/{xmlcodegen.h => xml-codegen.h} | 0 ragel/xmlparse.kl | 42 --------------------- 54 files changed, 121 insertions(+), 169 deletions(-) rename ragel/{cd-fsmcodegen.cpp => cd-codegen.cpp} (98%) rename ragel/{cd-fsmcodegen.h => cd-codegen.h} (100%) rename ragel/{cd-fflatcodegen.cpp => cd-fflat.cpp} (99%) rename ragel/{cd-fflatcodegen.h => cd-fflat.h} (98%) rename ragel/{cd-fgotocodegen.cpp => cd-fgoto.cpp} (99%) rename ragel/{cd-fgotocodegen.h => cd-fgoto.h} (98%) rename ragel/{cd-flatcodegen.cpp => cd-flat.cpp} (99%) rename ragel/{cd-flatcodegen.h => cd-flat.h} (99%) rename ragel/{cd-ftabcodegen.cpp => cd-ftable.cpp} (99%) rename ragel/{cd-ftabcodegen.h => cd-ftable.h} (98%) rename ragel/{cd-gotocodegen.cpp => cd-goto.cpp} (99%) rename ragel/{cd-gotocodegen.h => cd-goto.h} (99%) rename ragel/{cd-ipgotocodegen.cpp => cd-ipgoto.cpp} (99%) rename ragel/{cd-ipgotocodegen.h => cd-ipgoto.h} (99%) rename ragel/{cd-splitcodegen.cpp => cd-split.cpp} (99%) rename ragel/{cd-splitcodegen.h => cd-split.h} (98%) rename ragel/{cd-tabcodegen.cpp => cd-table.cpp} (99%) rename ragel/{cd-tabcodegen.h => cd-table.h} (99%) rename ragel/{cs-fsmcodegen.cpp => cs-codegen.cpp} (98%) rename ragel/{cs-fsmcodegen.h => cs-codegen.h} (100%) rename ragel/{cs-fflatcodegen.cpp => cs-fflat.cpp} (99%) rename ragel/{cs-fflatcodegen.h => cs-fflat.h} (98%) rename ragel/{cs-fgotocodegen.cpp => cs-fgoto.cpp} (99%) rename ragel/{cs-fgotocodegen.h => cs-fgoto.h} (98%) rename ragel/{cs-flatcodegen.cpp => cs-flat.cpp} (99%) rename ragel/{cs-flatcodegen.h => cs-flat.h} (99%) rename ragel/{cs-ftabcodegen.cpp => cs-ftable.cpp} (99%) rename ragel/{cs-ftabcodegen.h => cs-ftable.h} (98%) rename ragel/{cs-gotocodegen.cpp => cs-goto.cpp} (99%) rename ragel/{cs-gotocodegen.h => cs-goto.h} (99%) rename ragel/{cs-ipgotocodegen.cpp => cs-ipgoto.cpp} (99%) rename ragel/{cs-ipgotocodegen.h => cs-ipgoto.h} (98%) rename ragel/{cs-splitcodegen.cpp => cs-split.cpp} (99%) rename ragel/{cs-splitcodegen.h => cs-split.h} (98%) rename ragel/{cs-tabcodegen.cpp => cs-table.cpp} (99%) rename ragel/{cs-tabcodegen.h => cs-table.h} (99%) rename ragel/{rbx-gotocodegen.cpp => rbx-goto.cpp} (99%) rename ragel/{rbx-gotocodegen.h => rbx-goto.h} (100%) rename ragel/{ruby-fflatcodegen.cpp => ruby-fflat.cpp} (99%) rename ragel/{ruby-fflatcodegen.h => ruby-fflat.h} (98%) rename ragel/{ruby-flatcodegen.cpp => ruby-flat.cpp} (99%) rename ragel/{ruby-flatcodegen.h => ruby-flat.h} (100%) rename ragel/{ruby-ftabcodegen.cpp => ruby-ftable.cpp} (99%) rename ragel/{ruby-ftabcodegen.h => ruby-ftable.h} (98%) delete mode 100644 ragel/ruby-rlgen-ruby.h rename ragel/{ruby-tabcodegen.cpp => ruby-table.cpp} (99%) rename ragel/{ruby-tabcodegen.h => ruby-table.h} (100%) rename ragel/{xmlcodegen.cpp => xml-codegen.cpp} (99%) rename ragel/{xmlcodegen.h => xml-codegen.h} (100%) diff --git a/ragel/Makefile.in b/ragel/Makefile.in index 1e405ad..43d43af 100644 --- a/ragel/Makefile.in +++ b/ragel/Makefile.in @@ -26,23 +26,24 @@ LDFLAGS += CC_SRCS = \ main.cpp parsetree.cpp parsedata.cpp fsmstate.cpp fsmbase.cpp \ - fsmattach.cpp fsmmin.cpp fsmgraph.cpp fsmap.cpp xmlcodegen.cpp \ + fsmattach.cpp fsmmin.cpp fsmgraph.cpp fsmap.cpp \ rlscan.cpp rlparse.cpp inputdata.cpp common.cpp \ - redfsm.cpp gendata.cpp xmltags.cpp xmlscan.cpp xmlparse.cpp \ - cd-fsmcodegen.cpp \ - cd-tabcodegen.cpp cd-ftabcodegen.cpp cd-flatcodegen.cpp \ - cd-fflatcodegen.cpp cd-gotocodegen.cpp cd-fgotocodegen.cpp \ - cd-ipgotocodegen.cpp cd-splitcodegen.cpp \ + redfsm.cpp gendata.cpp \ + cd-codegen.cpp \ + cd-table.cpp cd-ftable.cpp cd-flat.cpp \ + cd-fflat.cpp cd-goto.cpp cd-fgoto.cpp \ + cd-ipgoto.cpp cd-split.cpp \ java-codegen.cpp \ - ruby-codegen.cpp ruby-tabcodegen.cpp ruby-ftabcodegen.cpp \ - ruby-flatcodegen.cpp ruby-fflatcodegen.cpp rbx-gotocodegen.cpp \ - cs-fsmcodegen.cpp cs-tabcodegen.cpp cs-ftabcodegen.cpp cs-flatcodegen.cpp \ - cs-fflatcodegen.cpp cs-gotocodegen.cpp cs-fgotocodegen.cpp \ - cs-ipgotocodegen.cpp cs-splitcodegen.cpp \ - dot-codegen.cpp + ruby-codegen.cpp ruby-table.cpp ruby-ftable.cpp \ + ruby-flat.cpp ruby-fflat.cpp rbx-goto.cpp \ + cs-codegen.cpp cs-table.cpp cs-ftable.cpp cs-flat.cpp \ + cs-fflat.cpp cs-goto.cpp cs-fgoto.cpp \ + cs-ipgoto.cpp cs-split.cpp \ + dot-codegen.cpp \ + xml-codegen.cpp \ GEN_SRC = version.h rlscan.cpp rlparse.h rlparse.cpp \ - xmltags.cpp xmlscan.cpp xmlparse.cpp xmlparse.h + xmltags.cpp xmlscan.cpp xmlparse.h LIBS = MINGW_LIBS = -lpsapi diff --git a/ragel/cd-fsmcodegen.cpp b/ragel/cd-codegen.cpp similarity index 98% rename from ragel/cd-fsmcodegen.cpp rename to ragel/cd-codegen.cpp index e7d8587..733ba48 100644 --- a/ragel/cd-fsmcodegen.cpp +++ b/ragel/cd-codegen.cpp @@ -21,8 +21,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "cd-codegen.h" #include "ragel.h" -#include "cd-fsmcodegen.h" #include "redfsm.h" #include "gendata.h" #include @@ -30,14 +30,14 @@ #include /* Code generators. */ -#include "cd-tabcodegen.h" -#include "cd-ftabcodegen.h" -#include "cd-flatcodegen.h" -#include "cd-fflatcodegen.h" -#include "cd-gotocodegen.h" -#include "cd-fgotocodegen.h" -#include "cd-ipgotocodegen.h" -#include "cd-splitcodegen.h" +#include "cd-table.h" +#include "cd-ftable.h" +#include "cd-flat.h" +#include "cd-fflat.h" +#include "cd-goto.h" +#include "cd-fgoto.h" +#include "cd-ipgoto.h" +#include "cd-split.h" using std::ostream; using std::ostringstream; diff --git a/ragel/cd-fsmcodegen.h b/ragel/cd-codegen.h similarity index 100% rename from ragel/cd-fsmcodegen.h rename to ragel/cd-codegen.h diff --git a/ragel/cd-fflatcodegen.cpp b/ragel/cd-fflat.cpp similarity index 99% rename from ragel/cd-fflatcodegen.cpp rename to ragel/cd-fflat.cpp index 892357f..ea630a5 100644 --- a/ragel/cd-fflatcodegen.cpp +++ b/ragel/cd-fflat.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cd-fflatcodegen.h" +#include "cd-fflat.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/cd-fflatcodegen.h b/ragel/cd-fflat.h similarity index 98% rename from ragel/cd-fflatcodegen.h rename to ragel/cd-fflat.h index 8d5d7fa..f3b3f27 100644 --- a/ragel/cd-fflatcodegen.h +++ b/ragel/cd-fflat.h @@ -25,7 +25,7 @@ #define _FFLATCODEGEN_H #include -#include "cd-flatcodegen.h" +#include "cd-flat.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cd-fgotocodegen.cpp b/ragel/cd-fgoto.cpp similarity index 99% rename from ragel/cd-fgotocodegen.cpp rename to ragel/cd-fgoto.cpp index 0be520b..b185a9d 100644 --- a/ragel/cd-fgotocodegen.cpp +++ b/ragel/cd-fgoto.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cd-fgotocodegen.h" +#include "cd-fgoto.h" #include "redfsm.h" #include "gendata.h" #include "bstmap.h" diff --git a/ragel/cd-fgotocodegen.h b/ragel/cd-fgoto.h similarity index 98% rename from ragel/cd-fgotocodegen.h rename to ragel/cd-fgoto.h index dcbd737..f98d690 100644 --- a/ragel/cd-fgotocodegen.h +++ b/ragel/cd-fgoto.h @@ -25,7 +25,7 @@ #define _FGOTOCODEGEN_H #include -#include "cd-gotocodegen.h" +#include "cd-goto.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cd-flatcodegen.cpp b/ragel/cd-flat.cpp similarity index 99% rename from ragel/cd-flatcodegen.cpp rename to ragel/cd-flat.cpp index a4c85f4..c4e3698 100644 --- a/ragel/cd-flatcodegen.cpp +++ b/ragel/cd-flat.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cd-flatcodegen.h" +#include "cd-flat.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/cd-flatcodegen.h b/ragel/cd-flat.h similarity index 99% rename from ragel/cd-flatcodegen.h rename to ragel/cd-flat.h index 3dba38d..d59fb8e 100644 --- a/ragel/cd-flatcodegen.h +++ b/ragel/cd-flat.h @@ -25,7 +25,7 @@ #define _FLATCODEGEN_H #include -#include "cd-fsmcodegen.h" +#include "cd-codegen.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cd-ftabcodegen.cpp b/ragel/cd-ftable.cpp similarity index 99% rename from ragel/cd-ftabcodegen.cpp rename to ragel/cd-ftable.cpp index 0c693e2..6f717bc 100644 --- a/ragel/cd-ftabcodegen.cpp +++ b/ragel/cd-ftable.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cd-ftabcodegen.h" +#include "cd-ftable.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/cd-ftabcodegen.h b/ragel/cd-ftable.h similarity index 98% rename from ragel/cd-ftabcodegen.h rename to ragel/cd-ftable.h index 10431d5..f013e58 100644 --- a/ragel/cd-ftabcodegen.h +++ b/ragel/cd-ftable.h @@ -25,7 +25,7 @@ #define _FTABCODEGEN_H #include -#include "cd-tabcodegen.h" +#include "cd-table.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cd-gotocodegen.cpp b/ragel/cd-goto.cpp similarity index 99% rename from ragel/cd-gotocodegen.cpp rename to ragel/cd-goto.cpp index b0488d9..ddb3457 100644 --- a/ragel/cd-gotocodegen.cpp +++ b/ragel/cd-goto.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cd-gotocodegen.h" +#include "cd-goto.h" #include "redfsm.h" #include "bstmap.h" #include "gendata.h" diff --git a/ragel/cd-gotocodegen.h b/ragel/cd-goto.h similarity index 99% rename from ragel/cd-gotocodegen.h rename to ragel/cd-goto.h index 18b8a48..a335e47 100644 --- a/ragel/cd-gotocodegen.h +++ b/ragel/cd-goto.h @@ -25,7 +25,7 @@ #define _GOTOCODEGEN_H #include -#include "cd-fsmcodegen.h" +#include "cd-codegen.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cd-ipgotocodegen.cpp b/ragel/cd-ipgoto.cpp similarity index 99% rename from ragel/cd-ipgotocodegen.cpp rename to ragel/cd-ipgoto.cpp index abb0ab3..901d88d 100644 --- a/ragel/cd-ipgotocodegen.cpp +++ b/ragel/cd-ipgoto.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cd-ipgotocodegen.h" +#include "cd-ipgoto.h" #include "redfsm.h" #include "gendata.h" #include "bstmap.h" diff --git a/ragel/cd-ipgotocodegen.h b/ragel/cd-ipgoto.h similarity index 99% rename from ragel/cd-ipgotocodegen.h rename to ragel/cd-ipgoto.h index 4de0701..fd17af7 100644 --- a/ragel/cd-ipgotocodegen.h +++ b/ragel/cd-ipgoto.h @@ -25,7 +25,7 @@ #define _IPGCODEGEN_H #include -#include "cd-gotocodegen.h" +#include "cd-goto.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cd-splitcodegen.cpp b/ragel/cd-split.cpp similarity index 99% rename from ragel/cd-splitcodegen.cpp rename to ragel/cd-split.cpp index bca6098..698f425 100644 --- a/ragel/cd-splitcodegen.cpp +++ b/ragel/cd-split.cpp @@ -21,7 +21,7 @@ #include "ragel.h" -#include "cd-splitcodegen.h" +#include "cd-split.h" #include "gendata.h" #include diff --git a/ragel/cd-splitcodegen.h b/ragel/cd-split.h similarity index 98% rename from ragel/cd-splitcodegen.h rename to ragel/cd-split.h index 995e343..75dbd65 100644 --- a/ragel/cd-splitcodegen.h +++ b/ragel/cd-split.h @@ -22,7 +22,7 @@ #ifndef _SPLITCODEGEN_H #define _SPLITCODEGEN_H -#include "cd-ipgotocodegen.h" +#include "cd-ipgoto.h" class SplitCodeGen : public IpGotoCodeGen { diff --git a/ragel/cd-tabcodegen.cpp b/ragel/cd-table.cpp similarity index 99% rename from ragel/cd-tabcodegen.cpp rename to ragel/cd-table.cpp index 198c5d9..5d95f78 100644 --- a/ragel/cd-tabcodegen.cpp +++ b/ragel/cd-table.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cd-tabcodegen.h" +#include "cd-table.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/cd-tabcodegen.h b/ragel/cd-table.h similarity index 99% rename from ragel/cd-tabcodegen.h rename to ragel/cd-table.h index fec2925..1f4abc4 100644 --- a/ragel/cd-tabcodegen.h +++ b/ragel/cd-table.h @@ -25,7 +25,7 @@ #define _TABCODEGEN_H #include -#include "cd-fsmcodegen.h" +#include "cd-codegen.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cs-fsmcodegen.cpp b/ragel/cs-codegen.cpp similarity index 98% rename from ragel/cs-fsmcodegen.cpp rename to ragel/cs-codegen.cpp index 939e6a7..c6953ad 100644 --- a/ragel/cs-fsmcodegen.cpp +++ b/ragel/cs-codegen.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cs-fsmcodegen.h" +#include "cs-codegen.h" #include "redfsm.h" #include "gendata.h" #include @@ -31,14 +31,14 @@ #include /* Code generators. */ -#include "cs-tabcodegen.h" -#include "cs-ftabcodegen.h" -#include "cs-flatcodegen.h" -#include "cs-fflatcodegen.h" -#include "cs-gotocodegen.h" -#include "cs-fgotocodegen.h" -#include "cs-ipgotocodegen.h" -#include "cs-splitcodegen.h" +#include "cs-table.h" +#include "cs-ftable.h" +#include "cs-flat.h" +#include "cs-fflat.h" +#include "cs-goto.h" +#include "cs-fgoto.h" +#include "cs-ipgoto.h" +#include "cs-split.h" using std::ostream; using std::ostringstream; diff --git a/ragel/cs-fsmcodegen.h b/ragel/cs-codegen.h similarity index 100% rename from ragel/cs-fsmcodegen.h rename to ragel/cs-codegen.h diff --git a/ragel/cs-fflatcodegen.cpp b/ragel/cs-fflat.cpp similarity index 99% rename from ragel/cs-fflatcodegen.cpp rename to ragel/cs-fflat.cpp index 10b50d5..eb968d7 100644 --- a/ragel/cs-fflatcodegen.cpp +++ b/ragel/cs-fflat.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cs-fflatcodegen.h" +#include "cs-fflat.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/cs-fflatcodegen.h b/ragel/cs-fflat.h similarity index 98% rename from ragel/cs-fflatcodegen.h rename to ragel/cs-fflat.h index 03f7bcd..89a66f1 100644 --- a/ragel/cs-fflatcodegen.h +++ b/ragel/cs-fflat.h @@ -25,7 +25,7 @@ #define _FFLATCODEGEN_H #include -#include "cs-flatcodegen.h" +#include "cs-flat.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cs-fgotocodegen.cpp b/ragel/cs-fgoto.cpp similarity index 99% rename from ragel/cs-fgotocodegen.cpp rename to ragel/cs-fgoto.cpp index 266d902..9e36372 100644 --- a/ragel/cs-fgotocodegen.cpp +++ b/ragel/cs-fgoto.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cs-fgotocodegen.h" +#include "cs-fgoto.h" #include "redfsm.h" #include "gendata.h" #include "bstmap.h" diff --git a/ragel/cs-fgotocodegen.h b/ragel/cs-fgoto.h similarity index 98% rename from ragel/cs-fgotocodegen.h rename to ragel/cs-fgoto.h index 2d300b4..5f289f3 100644 --- a/ragel/cs-fgotocodegen.h +++ b/ragel/cs-fgoto.h @@ -25,7 +25,7 @@ #define _FGOTOCODEGEN_H #include -#include "cs-gotocodegen.h" +#include "cs-goto.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cs-flatcodegen.cpp b/ragel/cs-flat.cpp similarity index 99% rename from ragel/cs-flatcodegen.cpp rename to ragel/cs-flat.cpp index 0dc3fa4..ba7c6b4 100644 --- a/ragel/cs-flatcodegen.cpp +++ b/ragel/cs-flat.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cs-flatcodegen.h" +#include "cs-flat.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/cs-flatcodegen.h b/ragel/cs-flat.h similarity index 99% rename from ragel/cs-flatcodegen.h rename to ragel/cs-flat.h index 6efbff5..0013ba4 100644 --- a/ragel/cs-flatcodegen.h +++ b/ragel/cs-flat.h @@ -25,7 +25,7 @@ #define _FLATCODEGEN_H #include -#include "cs-fsmcodegen.h" +#include "cs-codegen.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cs-ftabcodegen.cpp b/ragel/cs-ftable.cpp similarity index 99% rename from ragel/cs-ftabcodegen.cpp rename to ragel/cs-ftable.cpp index 39800f9..65b2bc3 100644 --- a/ragel/cs-ftabcodegen.cpp +++ b/ragel/cs-ftable.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cs-ftabcodegen.h" +#include "cs-ftable.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/cs-ftabcodegen.h b/ragel/cs-ftable.h similarity index 98% rename from ragel/cs-ftabcodegen.h rename to ragel/cs-ftable.h index 31ec65e..1e8e1ec 100644 --- a/ragel/cs-ftabcodegen.h +++ b/ragel/cs-ftable.h @@ -25,7 +25,7 @@ #define _FTABCODEGEN_H #include -#include "cs-tabcodegen.h" +#include "cs-table.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cs-gotocodegen.cpp b/ragel/cs-goto.cpp similarity index 99% rename from ragel/cs-gotocodegen.cpp rename to ragel/cs-goto.cpp index 14ba07d..4c375f9 100644 --- a/ragel/cs-gotocodegen.cpp +++ b/ragel/cs-goto.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cs-gotocodegen.h" +#include "cs-goto.h" #include "redfsm.h" #include "bstmap.h" #include "gendata.h" diff --git a/ragel/cs-gotocodegen.h b/ragel/cs-goto.h similarity index 99% rename from ragel/cs-gotocodegen.h rename to ragel/cs-goto.h index cf08534..1e313b5 100644 --- a/ragel/cs-gotocodegen.h +++ b/ragel/cs-goto.h @@ -25,7 +25,7 @@ #define _GOTOCODEGEN_H #include -#include "cs-fsmcodegen.h" +#include "cs-codegen.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cs-ipgotocodegen.cpp b/ragel/cs-ipgoto.cpp similarity index 99% rename from ragel/cs-ipgotocodegen.cpp rename to ragel/cs-ipgoto.cpp index 5efa04d..e756515 100644 --- a/ragel/cs-ipgotocodegen.cpp +++ b/ragel/cs-ipgoto.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cs-ipgotocodegen.h" +#include "cs-ipgoto.h" #include "redfsm.h" #include "gendata.h" #include "bstmap.h" diff --git a/ragel/cs-ipgotocodegen.h b/ragel/cs-ipgoto.h similarity index 98% rename from ragel/cs-ipgotocodegen.h rename to ragel/cs-ipgoto.h index 7a743ae..60ba295 100644 --- a/ragel/cs-ipgotocodegen.h +++ b/ragel/cs-ipgoto.h @@ -25,7 +25,7 @@ #define _IPGCODEGEN_H #include -#include "cs-gotocodegen.h" +#include "cs-goto.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/cs-splitcodegen.cpp b/ragel/cs-split.cpp similarity index 99% rename from ragel/cs-splitcodegen.cpp rename to ragel/cs-split.cpp index b64f415..427c208 100644 --- a/ragel/cs-splitcodegen.cpp +++ b/ragel/cs-split.cpp @@ -21,7 +21,7 @@ #include "ragel.h" -#include "cs-splitcodegen.h" +#include "cs-split.h" #include "gendata.h" #include diff --git a/ragel/cs-splitcodegen.h b/ragel/cs-split.h similarity index 98% rename from ragel/cs-splitcodegen.h rename to ragel/cs-split.h index 1cfc857..dd2e3f1 100644 --- a/ragel/cs-splitcodegen.h +++ b/ragel/cs-split.h @@ -22,7 +22,7 @@ #ifndef _SPLITCODEGEN_H #define _SPLITCODEGEN_H -#include "cs-ipgotocodegen.h" +#include "cs-ipgoto.h" class CSharpSplitCodeGen : public CSharpIpGotoCodeGen { diff --git a/ragel/cs-tabcodegen.cpp b/ragel/cs-table.cpp similarity index 99% rename from ragel/cs-tabcodegen.cpp rename to ragel/cs-table.cpp index bbcab61..52cc173 100644 --- a/ragel/cs-tabcodegen.cpp +++ b/ragel/cs-table.cpp @@ -22,7 +22,7 @@ */ #include "ragel.h" -#include "cs-tabcodegen.h" +#include "cs-table.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/cs-tabcodegen.h b/ragel/cs-table.h similarity index 99% rename from ragel/cs-tabcodegen.h rename to ragel/cs-table.h index ee17ede..0e9b610 100644 --- a/ragel/cs-tabcodegen.h +++ b/ragel/cs-table.h @@ -25,7 +25,7 @@ #define _TABCODEGEN_H #include -#include "cs-fsmcodegen.h" +#include "cs-codegen.h" /* Forwards. */ struct CodeGenData; diff --git a/ragel/gendata.cpp b/ragel/gendata.cpp index 14124eb..cb6b62c 100644 --- a/ragel/gendata.cpp +++ b/ragel/gendata.cpp @@ -25,6 +25,49 @@ using std::cerr; using std::endl; +CodeGenData *makeCodeGen( const char *sourceFileName, const char *fsmName, + ostream &out, bool wantComplete ) +{ + CodeGenData *cgd = 0; + if ( generateDot ) + cgd = dotMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); + else if ( hostLang == &hostLangC ) + cgd = cdMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); + else if ( hostLang == &hostLangD ) + cgd = cdMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); + else if ( hostLang == &hostLangJava ) + cgd = javaMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); + else if ( hostLang == &hostLangRuby ) + cgd = rubyMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); + else if ( hostLang == &hostLangCSharp ) + cgd = csharpMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); + return cgd; +} + +void lineDirective( ostream &out, const char *fileName, int line ) +{ + if ( !generateDot ) { + if ( hostLang == &hostLangC ) + cdLineDirective( out, fileName, line ); + else if ( hostLang == &hostLangD ) + cdLineDirective( out, fileName, line ); + else if ( hostLang == &hostLangJava ) + javaLineDirective( out, fileName, line ); + else if ( hostLang == &hostLangRuby ) + rubyLineDirective( out, fileName, line ); + else if ( hostLang == &hostLangCSharp ) + csharpLineDirective( out, fileName, line ); + } +} + +void genLineDirective( ostream &out ) +{ + std::streambuf *sbuf = out.rdbuf(); + output_filter *filter = static_cast(sbuf); + lineDirective( out, filter->fileName, filter->line + 1 ); +} + + /* Total error count. */ /* int gblErrorCount = 0; */ diff --git a/ragel/parsedata.cpp b/ragel/parsedata.cpp index 4626fa0..6de083e 100644 --- a/ragel/parsedata.cpp +++ b/ragel/parsedata.cpp @@ -30,7 +30,7 @@ #include "parsedata.h" #include "parsetree.h" #include "mergesort.h" -#include "xmlcodegen.h" +#include "xml-codegen.h" #include "version.h" #include "xmlparse.h" #include "inputdata.h" diff --git a/ragel/rbx-gotocodegen.cpp b/ragel/rbx-goto.cpp similarity index 99% rename from ragel/rbx-gotocodegen.cpp rename to ragel/rbx-goto.cpp index fe86a9a..26b61df 100644 --- a/ragel/rbx-gotocodegen.cpp +++ b/ragel/rbx-goto.cpp @@ -23,7 +23,7 @@ #include #include -#include "rbx-gotocodegen.h" +#include "rbx-goto.h" #include "ragel.h" #include "redfsm.h" #include "bstmap.h" diff --git a/ragel/rbx-gotocodegen.h b/ragel/rbx-goto.h similarity index 100% rename from ragel/rbx-gotocodegen.h rename to ragel/rbx-goto.h diff --git a/ragel/ruby-codegen.cpp b/ragel/ruby-codegen.cpp index 4e8fab3..03b08d1 100644 --- a/ragel/ruby-codegen.cpp +++ b/ragel/ruby-codegen.cpp @@ -33,11 +33,11 @@ #include "common.h" #include "ragel.h" -#include "ruby-tabcodegen.h" -#include "ruby-ftabcodegen.h" -#include "ruby-flatcodegen.h" -#include "ruby-fflatcodegen.h" -#include "rbx-gotocodegen.h" +#include "ruby-table.h" +#include "ruby-ftable.h" +#include "ruby-flat.h" +#include "ruby-fflat.h" +#include "rbx-goto.h" using std::ostream; using std::ostringstream; diff --git a/ragel/ruby-fflatcodegen.cpp b/ragel/ruby-fflat.cpp similarity index 99% rename from ragel/ruby-fflatcodegen.cpp rename to ragel/ruby-fflat.cpp index 0b726c2..f4feca2 100644 --- a/ragel/ruby-fflatcodegen.cpp +++ b/ragel/ruby-fflat.cpp @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ruby-fflatcodegen.h" +#include "ruby-fflat.h" void RubyFFlatCodeGen::GOTO( ostream &out, int gotoDest, bool inFinish ) { diff --git a/ragel/ruby-fflatcodegen.h b/ragel/ruby-fflat.h similarity index 98% rename from ragel/ruby-fflatcodegen.h rename to ragel/ruby-fflat.h index 6a58698..705fbae 100644 --- a/ragel/ruby-fflatcodegen.h +++ b/ragel/ruby-fflat.h @@ -24,7 +24,7 @@ #define _RUBY_FFLATCODEGEN_H #include -#include "ruby-flatcodegen.h" +#include "ruby-flat.h" class RubyFFlatCodeGen : public RubyFlatCodeGen { diff --git a/ragel/ruby-flatcodegen.cpp b/ragel/ruby-flat.cpp similarity index 99% rename from ragel/ruby-flatcodegen.cpp rename to ragel/ruby-flat.cpp index 3265baa..7937311 100644 --- a/ragel/ruby-flatcodegen.cpp +++ b/ragel/ruby-flat.cpp @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ruby-flatcodegen.h" +#include "ruby-flat.h" #include "ragel.h" #include "redfsm.h" #include "gendata.h" diff --git a/ragel/ruby-flatcodegen.h b/ragel/ruby-flat.h similarity index 100% rename from ragel/ruby-flatcodegen.h rename to ragel/ruby-flat.h diff --git a/ragel/ruby-ftabcodegen.cpp b/ragel/ruby-ftable.cpp similarity index 99% rename from ragel/ruby-ftabcodegen.cpp rename to ragel/ruby-ftable.cpp index d5bce48..37b896e 100644 --- a/ragel/ruby-ftabcodegen.cpp +++ b/ragel/ruby-ftable.cpp @@ -25,7 +25,7 @@ #include "redfsm.h" #include "gendata.h" #include "ragel.h" -#include "ruby-ftabcodegen.h" +#include "ruby-ftable.h" using std::ostream; using std::ostringstream; diff --git a/ragel/ruby-ftabcodegen.h b/ragel/ruby-ftable.h similarity index 98% rename from ragel/ruby-ftabcodegen.h rename to ragel/ruby-ftable.h index 9811511..0909471 100644 --- a/ragel/ruby-ftabcodegen.h +++ b/ragel/ruby-ftable.h @@ -23,7 +23,7 @@ #ifndef _RUBY_FTABCODEGEN_H #define _RUBY_FTABCODEGEN_H -#include "ruby-tabcodegen.h" +#include "ruby-table.h" class RubyFTabCodeGen : public RubyTabCodeGen { diff --git a/ragel/ruby-rlgen-ruby.h b/ragel/ruby-rlgen-ruby.h deleted file mode 100644 index ad64226..0000000 --- a/ragel/ruby-rlgen-ruby.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 2007 Victor Hugo Borja - * Copyright 2001-2007 Adrian Thurston - */ - -/* This file is part of Ragel. - * - * Ragel is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Ragel is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ragel; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef _RLGEN_RUBY_H -#define _RLGEN_RUBY_H - -#include -#include "config.h" -#include "common.h" - -extern RubyImplEnum rubyImpl; -extern CodeStyleEnum codeStyle; - -extern int gblErrorCount; -extern char machineMain[]; - -/* Options. */ -extern int numSplitPartitions; -extern bool noLineDirectives; - -std::ostream &error(); - -/* - * Local Variables: - * mode: c++ - * indent-tabs-mode: 1 - * c-file-style: "bsd" - * End: - */ - -#endif /* _RLGEN_RUBY_H */ diff --git a/ragel/ruby-tabcodegen.cpp b/ragel/ruby-table.cpp similarity index 99% rename from ragel/ruby-tabcodegen.cpp rename to ragel/ruby-table.cpp index ed43e69..8bd6176 100644 --- a/ragel/ruby-tabcodegen.cpp +++ b/ragel/ruby-table.cpp @@ -25,7 +25,7 @@ #include "redfsm.h" #include "gendata.h" #include "ragel.h" -#include "ruby-tabcodegen.h" +#include "ruby-table.h" using std::ostream; using std::ostringstream; diff --git a/ragel/ruby-tabcodegen.h b/ragel/ruby-table.h similarity index 100% rename from ragel/ruby-tabcodegen.h rename to ragel/ruby-table.h diff --git a/ragel/xmlcodegen.cpp b/ragel/xml-codegen.cpp similarity index 99% rename from ragel/xmlcodegen.cpp rename to ragel/xml-codegen.cpp index 30b757e..956a8cd 100644 --- a/ragel/xmlcodegen.cpp +++ b/ragel/xml-codegen.cpp @@ -21,7 +21,7 @@ #include "ragel.h" -#include "xmlcodegen.h" +#include "xml-codegen.h" #include "xmlparse.h" #include "parsedata.h" #include "fsmgraph.h" diff --git a/ragel/xmlcodegen.h b/ragel/xml-codegen.h similarity index 100% rename from ragel/xmlcodegen.h rename to ragel/xml-codegen.h diff --git a/ragel/xmlparse.kl b/ragel/xmlparse.kl index c7cabfc..2dc572d 100644 --- a/ragel/xmlparse.kl +++ b/ragel/xmlparse.kl @@ -42,48 +42,6 @@ struct Token InputLoc loc; }; -CodeGenData *makeCodeGen( const char *sourceFileName, const char *fsmName, - ostream &out, bool wantComplete ) -{ - CodeGenData *cgd = 0; - if ( generateDot ) - cgd = dotMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); - else if ( hostLang == &hostLangC ) - cgd = cdMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); - else if ( hostLang == &hostLangD ) - cgd = cdMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); - else if ( hostLang == &hostLangJava ) - cgd = javaMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); - else if ( hostLang == &hostLangRuby ) - cgd = rubyMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); - else if ( hostLang == &hostLangCSharp ) - cgd = csharpMakeCodeGen( sourceFileName, fsmName, out, wantComplete ); - return cgd; -} - -void lineDirective( ostream &out, const char *fileName, int line ) -{ - if ( !generateDot ) { - if ( hostLang == &hostLangC ) - cdLineDirective( out, fileName, line ); - else if ( hostLang == &hostLangD ) - cdLineDirective( out, fileName, line ); - else if ( hostLang == &hostLangJava ) - javaLineDirective( out, fileName, line ); - else if ( hostLang == &hostLangRuby ) - rubyLineDirective( out, fileName, line ); - else if ( hostLang == &hostLangCSharp ) - csharpLineDirective( out, fileName, line ); - } -} - -void genLineDirective( ostream &out ) -{ - std::streambuf *sbuf = out.rdbuf(); - output_filter *filter = static_cast(sbuf); - lineDirective( out, filter->fileName, filter->line + 1 ); -} - %%{ parser XmlParser; -- 2.7.4