More renaming.
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sat, 15 Nov 2008 18:13:22 +0000 (18:13 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sat, 15 Nov 2008 18:13:22 +0000 (18:13 +0000)
git-svn-id: http://svn.complang.org/ragel/trunk@571 052ea7fc-9027-0410-9066-f65837a77df0

54 files changed:
ragel/Makefile.in
ragel/cd-codegen.cpp [moved from ragel/cd-fsmcodegen.cpp with 98% similarity]
ragel/cd-codegen.h [moved from ragel/cd-fsmcodegen.h with 100% similarity]
ragel/cd-fflat.cpp [moved from ragel/cd-fflatcodegen.cpp with 99% similarity]
ragel/cd-fflat.h [moved from ragel/cd-fflatcodegen.h with 98% similarity]
ragel/cd-fgoto.cpp [moved from ragel/cd-fgotocodegen.cpp with 99% similarity]
ragel/cd-fgoto.h [moved from ragel/cd-fgotocodegen.h with 98% similarity]
ragel/cd-flat.cpp [moved from ragel/cd-flatcodegen.cpp with 99% similarity]
ragel/cd-flat.h [moved from ragel/cd-flatcodegen.h with 99% similarity]
ragel/cd-ftable.cpp [moved from ragel/cd-ftabcodegen.cpp with 99% similarity]
ragel/cd-ftable.h [moved from ragel/cd-ftabcodegen.h with 98% similarity]
ragel/cd-goto.cpp [moved from ragel/cd-gotocodegen.cpp with 99% similarity]
ragel/cd-goto.h [moved from ragel/cd-gotocodegen.h with 99% similarity]
ragel/cd-ipgoto.cpp [moved from ragel/cd-ipgotocodegen.cpp with 99% similarity]
ragel/cd-ipgoto.h [moved from ragel/cd-ipgotocodegen.h with 99% similarity]
ragel/cd-split.cpp [moved from ragel/cd-splitcodegen.cpp with 99% similarity]
ragel/cd-split.h [moved from ragel/cd-splitcodegen.h with 98% similarity]
ragel/cd-table.cpp [moved from ragel/cd-tabcodegen.cpp with 99% similarity]
ragel/cd-table.h [moved from ragel/cd-tabcodegen.h with 99% similarity]
ragel/cs-codegen.cpp [moved from ragel/cs-fsmcodegen.cpp with 98% similarity]
ragel/cs-codegen.h [moved from ragel/cs-fsmcodegen.h with 100% similarity]
ragel/cs-fflat.cpp [moved from ragel/cs-fflatcodegen.cpp with 99% similarity]
ragel/cs-fflat.h [moved from ragel/cs-fflatcodegen.h with 98% similarity]
ragel/cs-fgoto.cpp [moved from ragel/cs-fgotocodegen.cpp with 99% similarity]
ragel/cs-fgoto.h [moved from ragel/cs-fgotocodegen.h with 98% similarity]
ragel/cs-flat.cpp [moved from ragel/cs-flatcodegen.cpp with 99% similarity]
ragel/cs-flat.h [moved from ragel/cs-flatcodegen.h with 99% similarity]
ragel/cs-ftable.cpp [moved from ragel/cs-ftabcodegen.cpp with 99% similarity]
ragel/cs-ftable.h [moved from ragel/cs-ftabcodegen.h with 98% similarity]
ragel/cs-goto.cpp [moved from ragel/cs-gotocodegen.cpp with 99% similarity]
ragel/cs-goto.h [moved from ragel/cs-gotocodegen.h with 99% similarity]
ragel/cs-ipgoto.cpp [moved from ragel/cs-ipgotocodegen.cpp with 99% similarity]
ragel/cs-ipgoto.h [moved from ragel/cs-ipgotocodegen.h with 98% similarity]
ragel/cs-split.cpp [moved from ragel/cs-splitcodegen.cpp with 99% similarity]
ragel/cs-split.h [moved from ragel/cs-splitcodegen.h with 98% similarity]
ragel/cs-table.cpp [moved from ragel/cs-tabcodegen.cpp with 99% similarity]
ragel/cs-table.h [moved from ragel/cs-tabcodegen.h with 99% similarity]
ragel/gendata.cpp
ragel/parsedata.cpp
ragel/rbx-goto.cpp [moved from ragel/rbx-gotocodegen.cpp with 99% similarity]
ragel/rbx-goto.h [moved from ragel/rbx-gotocodegen.h with 100% similarity]
ragel/ruby-codegen.cpp
ragel/ruby-fflat.cpp [moved from ragel/ruby-fflatcodegen.cpp with 99% similarity]
ragel/ruby-fflat.h [moved from ragel/ruby-fflatcodegen.h with 98% similarity]
ragel/ruby-flat.cpp [moved from ragel/ruby-flatcodegen.cpp with 99% similarity]
ragel/ruby-flat.h [moved from ragel/ruby-flatcodegen.h with 100% similarity]
ragel/ruby-ftable.cpp [moved from ragel/ruby-ftabcodegen.cpp with 99% similarity]
ragel/ruby-ftable.h [moved from ragel/ruby-ftabcodegen.h with 98% similarity]
ragel/ruby-rlgen-ruby.h [deleted file]
ragel/ruby-table.cpp [moved from ragel/ruby-tabcodegen.cpp with 99% similarity]
ragel/ruby-table.h [moved from ragel/ruby-tabcodegen.h with 100% similarity]
ragel/xml-codegen.cpp [moved from ragel/xmlcodegen.cpp with 99% similarity]
ragel/xml-codegen.h [moved from ragel/xmlcodegen.h with 100% similarity]
ragel/xmlparse.kl

index 1e405ad..43d43af 100644 (file)
@@ -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
similarity index 98%
rename from ragel/cd-fsmcodegen.cpp
rename to ragel/cd-codegen.cpp
index e7d8587..733ba48 100644 (file)
@@ -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 <sstream>
 #include <assert.h>
 
 /* 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;
similarity index 100%
rename from ragel/cd-fsmcodegen.h
rename to ragel/cd-codegen.h
similarity index 99%
rename from ragel/cd-fflatcodegen.cpp
rename to ragel/cd-fflat.cpp
index 892357f..ea630a5 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cd-fflatcodegen.h"
+#include "cd-fflat.h"
 #include "redfsm.h"
 #include "gendata.h"
 
similarity index 98%
rename from ragel/cd-fflatcodegen.h
rename to ragel/cd-fflat.h
index 8d5d7fa..f3b3f27 100644 (file)
@@ -25,7 +25,7 @@
 #define _FFLATCODEGEN_H
 
 #include <iostream>
-#include "cd-flatcodegen.h"
+#include "cd-flat.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cd-fgotocodegen.cpp
rename to ragel/cd-fgoto.cpp
index 0be520b..b185a9d 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cd-fgotocodegen.h"
+#include "cd-fgoto.h"
 #include "redfsm.h"
 #include "gendata.h"
 #include "bstmap.h"
similarity index 98%
rename from ragel/cd-fgotocodegen.h
rename to ragel/cd-fgoto.h
index dcbd737..f98d690 100644 (file)
@@ -25,7 +25,7 @@
 #define _FGOTOCODEGEN_H
 
 #include <iostream>
-#include "cd-gotocodegen.h"
+#include "cd-goto.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cd-flatcodegen.cpp
rename to ragel/cd-flat.cpp
index a4c85f4..c4e3698 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cd-flatcodegen.h"
+#include "cd-flat.h"
 #include "redfsm.h"
 #include "gendata.h"
 
similarity index 99%
rename from ragel/cd-flatcodegen.h
rename to ragel/cd-flat.h
index 3dba38d..d59fb8e 100644 (file)
@@ -25,7 +25,7 @@
 #define _FLATCODEGEN_H
 
 #include <iostream>
-#include "cd-fsmcodegen.h"
+#include "cd-codegen.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cd-ftabcodegen.cpp
rename to ragel/cd-ftable.cpp
index 0c693e2..6f717bc 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cd-ftabcodegen.h"
+#include "cd-ftable.h"
 #include "redfsm.h"
 #include "gendata.h"
 
similarity index 98%
rename from ragel/cd-ftabcodegen.h
rename to ragel/cd-ftable.h
index 10431d5..f013e58 100644 (file)
@@ -25,7 +25,7 @@
 #define _FTABCODEGEN_H
 
 #include <iostream>
-#include "cd-tabcodegen.h"
+#include "cd-table.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cd-gotocodegen.cpp
rename to ragel/cd-goto.cpp
index b0488d9..ddb3457 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cd-gotocodegen.h"
+#include "cd-goto.h"
 #include "redfsm.h"
 #include "bstmap.h"
 #include "gendata.h"
similarity index 99%
rename from ragel/cd-gotocodegen.h
rename to ragel/cd-goto.h
index 18b8a48..a335e47 100644 (file)
@@ -25,7 +25,7 @@
 #define _GOTOCODEGEN_H
 
 #include <iostream>
-#include "cd-fsmcodegen.h"
+#include "cd-codegen.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cd-ipgotocodegen.cpp
rename to ragel/cd-ipgoto.cpp
index abb0ab3..901d88d 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cd-ipgotocodegen.h"
+#include "cd-ipgoto.h"
 #include "redfsm.h"
 #include "gendata.h"
 #include "bstmap.h"
similarity index 99%
rename from ragel/cd-ipgotocodegen.h
rename to ragel/cd-ipgoto.h
index 4de0701..fd17af7 100644 (file)
@@ -25,7 +25,7 @@
 #define _IPGCODEGEN_H
 
 #include <iostream>
-#include "cd-gotocodegen.h"
+#include "cd-goto.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cd-splitcodegen.cpp
rename to ragel/cd-split.cpp
index bca6098..698f425 100644 (file)
@@ -21,7 +21,7 @@
 
 
 #include "ragel.h"
-#include "cd-splitcodegen.h"
+#include "cd-split.h"
 #include "gendata.h"
 #include <assert.h>
 
similarity index 98%
rename from ragel/cd-splitcodegen.h
rename to ragel/cd-split.h
index 995e343..75dbd65 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef _SPLITCODEGEN_H
 #define _SPLITCODEGEN_H
 
-#include "cd-ipgotocodegen.h"
+#include "cd-ipgoto.h"
 
 class SplitCodeGen : public IpGotoCodeGen
 {
similarity index 99%
rename from ragel/cd-tabcodegen.cpp
rename to ragel/cd-table.cpp
index 198c5d9..5d95f78 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cd-tabcodegen.h"
+#include "cd-table.h"
 #include "redfsm.h"
 #include "gendata.h"
 
similarity index 99%
rename from ragel/cd-tabcodegen.h
rename to ragel/cd-table.h
index fec2925..1f4abc4 100644 (file)
@@ -25,7 +25,7 @@
 #define _TABCODEGEN_H
 
 #include <iostream>
-#include "cd-fsmcodegen.h"
+#include "cd-codegen.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 98%
rename from ragel/cs-fsmcodegen.cpp
rename to ragel/cs-codegen.cpp
index 939e6a7..c6953ad 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cs-fsmcodegen.h"
+#include "cs-codegen.h"
 #include "redfsm.h"
 #include "gendata.h"
 #include <sstream>
 #include <assert.h>
 
 /* 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;
similarity index 100%
rename from ragel/cs-fsmcodegen.h
rename to ragel/cs-codegen.h
similarity index 99%
rename from ragel/cs-fflatcodegen.cpp
rename to ragel/cs-fflat.cpp
index 10b50d5..eb968d7 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cs-fflatcodegen.h"
+#include "cs-fflat.h"
 #include "redfsm.h"
 #include "gendata.h"
 
similarity index 98%
rename from ragel/cs-fflatcodegen.h
rename to ragel/cs-fflat.h
index 03f7bcd..89a66f1 100644 (file)
@@ -25,7 +25,7 @@
 #define _FFLATCODEGEN_H
 
 #include <iostream>
-#include "cs-flatcodegen.h"
+#include "cs-flat.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cs-fgotocodegen.cpp
rename to ragel/cs-fgoto.cpp
index 266d902..9e36372 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cs-fgotocodegen.h"
+#include "cs-fgoto.h"
 #include "redfsm.h"
 #include "gendata.h"
 #include "bstmap.h"
similarity index 98%
rename from ragel/cs-fgotocodegen.h
rename to ragel/cs-fgoto.h
index 2d300b4..5f289f3 100644 (file)
@@ -25,7 +25,7 @@
 #define _FGOTOCODEGEN_H
 
 #include <iostream>
-#include "cs-gotocodegen.h"
+#include "cs-goto.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cs-flatcodegen.cpp
rename to ragel/cs-flat.cpp
index 0dc3fa4..ba7c6b4 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cs-flatcodegen.h"
+#include "cs-flat.h"
 #include "redfsm.h"
 #include "gendata.h"
 
similarity index 99%
rename from ragel/cs-flatcodegen.h
rename to ragel/cs-flat.h
index 6efbff5..0013ba4 100644 (file)
@@ -25,7 +25,7 @@
 #define _FLATCODEGEN_H
 
 #include <iostream>
-#include "cs-fsmcodegen.h"
+#include "cs-codegen.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cs-ftabcodegen.cpp
rename to ragel/cs-ftable.cpp
index 39800f9..65b2bc3 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cs-ftabcodegen.h"
+#include "cs-ftable.h"
 #include "redfsm.h"
 #include "gendata.h"
 
similarity index 98%
rename from ragel/cs-ftabcodegen.h
rename to ragel/cs-ftable.h
index 31ec65e..1e8e1ec 100644 (file)
@@ -25,7 +25,7 @@
 #define _FTABCODEGEN_H
 
 #include <iostream>
-#include "cs-tabcodegen.h"
+#include "cs-table.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cs-gotocodegen.cpp
rename to ragel/cs-goto.cpp
index 14ba07d..4c375f9 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cs-gotocodegen.h"
+#include "cs-goto.h"
 #include "redfsm.h"
 #include "bstmap.h"
 #include "gendata.h"
similarity index 99%
rename from ragel/cs-gotocodegen.h
rename to ragel/cs-goto.h
index cf08534..1e313b5 100644 (file)
@@ -25,7 +25,7 @@
 #define _GOTOCODEGEN_H
 
 #include <iostream>
-#include "cs-fsmcodegen.h"
+#include "cs-codegen.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cs-ipgotocodegen.cpp
rename to ragel/cs-ipgoto.cpp
index 5efa04d..e756515 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cs-ipgotocodegen.h"
+#include "cs-ipgoto.h"
 #include "redfsm.h"
 #include "gendata.h"
 #include "bstmap.h"
similarity index 98%
rename from ragel/cs-ipgotocodegen.h
rename to ragel/cs-ipgoto.h
index 7a743ae..60ba295 100644 (file)
@@ -25,7 +25,7 @@
 #define _IPGCODEGEN_H
 
 #include <iostream>
-#include "cs-gotocodegen.h"
+#include "cs-goto.h"
 
 /* Forwards. */
 struct CodeGenData;
similarity index 99%
rename from ragel/cs-splitcodegen.cpp
rename to ragel/cs-split.cpp
index b64f415..427c208 100644 (file)
@@ -21,7 +21,7 @@
 
 
 #include "ragel.h"
-#include "cs-splitcodegen.h"
+#include "cs-split.h"
 #include "gendata.h"
 #include <assert.h>
 
similarity index 98%
rename from ragel/cs-splitcodegen.h
rename to ragel/cs-split.h
index 1cfc857..dd2e3f1 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef _SPLITCODEGEN_H
 #define _SPLITCODEGEN_H
 
-#include "cs-ipgotocodegen.h"
+#include "cs-ipgoto.h"
 
 class CSharpSplitCodeGen : public CSharpIpGotoCodeGen
 {
similarity index 99%
rename from ragel/cs-tabcodegen.cpp
rename to ragel/cs-table.cpp
index bbcab61..52cc173 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "ragel.h"
-#include "cs-tabcodegen.h"
+#include "cs-table.h"
 #include "redfsm.h"
 #include "gendata.h"
 
similarity index 99%
rename from ragel/cs-tabcodegen.h
rename to ragel/cs-table.h
index ee17ede..0e9b610 100644 (file)
@@ -25,7 +25,7 @@
 #define _TABCODEGEN_H
 
 #include <iostream>
-#include "cs-fsmcodegen.h"
+#include "cs-codegen.h"
 
 /* Forwards. */
 struct CodeGenData;
index 14124eb..cb6b62c 100644 (file)
 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<output_filter*>(sbuf);
+       lineDirective( out, filter->fileName, filter->line + 1 );
+}
+
+
 /* Total error count. */
 /* int gblErrorCount = 0; */
 
index 4626fa0..6de083e 100644 (file)
@@ -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"
similarity index 99%
rename from ragel/rbx-gotocodegen.cpp
rename to ragel/rbx-goto.cpp
index fe86a9a..26b61df 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include <string>
 
-#include "rbx-gotocodegen.h"
+#include "rbx-goto.h"
 #include "ragel.h"
 #include "redfsm.h"
 #include "bstmap.h"
similarity index 100%
rename from ragel/rbx-gotocodegen.h
rename to ragel/rbx-goto.h
index 4e8fab3..03b08d1 100644 (file)
 #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;
similarity index 99%
rename from ragel/ruby-fflatcodegen.cpp
rename to ragel/ruby-fflat.cpp
index 0b726c2..f4feca2 100644 (file)
@@ -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 )
 {
similarity index 98%
rename from ragel/ruby-fflatcodegen.h
rename to ragel/ruby-fflat.h
index 6a58698..705fbae 100644 (file)
@@ -24,7 +24,7 @@
 #define _RUBY_FFLATCODEGEN_H
 
 #include <iostream>
-#include "ruby-flatcodegen.h"
+#include "ruby-flat.h"
 
 class RubyFFlatCodeGen : public RubyFlatCodeGen 
 {
similarity index 99%
rename from ragel/ruby-flatcodegen.cpp
rename to ragel/ruby-flat.cpp
index 3265baa..7937311 100644 (file)
@@ -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"
similarity index 100%
rename from ragel/ruby-flatcodegen.h
rename to ragel/ruby-flat.h
similarity index 99%
rename from ragel/ruby-ftabcodegen.cpp
rename to ragel/ruby-ftable.cpp
index d5bce48..37b896e 100644 (file)
@@ -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;
similarity index 98%
rename from ragel/ruby-ftabcodegen.h
rename to ragel/ruby-ftable.h
index 9811511..0909471 100644 (file)
@@ -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 (file)
index ad64226..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  2007 Victor Hugo Borja <vic@rubyforge.org>
- *  Copyright 2001-2007 Adrian Thurston <thurston@complang.org>
- */
-
-/*  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 <iostream>
-#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 */
similarity index 99%
rename from ragel/ruby-tabcodegen.cpp
rename to ragel/ruby-table.cpp
index ed43e69..8bd6176 100644 (file)
@@ -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;
similarity index 100%
rename from ragel/ruby-tabcodegen.h
rename to ragel/ruby-table.h
similarity index 99%
rename from ragel/xmlcodegen.cpp
rename to ragel/xml-codegen.cpp
index 30b757e..956a8cd 100644 (file)
@@ -21,7 +21,7 @@
 
 
 #include "ragel.h"
-#include "xmlcodegen.h"
+#include "xml-codegen.h"
 #include "xmlparse.h"
 #include "parsedata.h"
 #include "fsmgraph.h"
similarity index 100%
rename from ragel/xmlcodegen.h
rename to ragel/xml-codegen.h
index c7cabfc..2dc572d 100644 (file)
@@ -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<output_filter*>(sbuf);
-       lineDirective( out, filter->fileName, filter->line + 1 );
-}
-
 %%{
 
 parser XmlParser;