fi
-ac_config_files="$ac_config_files Makefile common/Makefile ragel/Makefile redfsm/Makefile rlgen-cd/Makefile rlgen-java/Makefile rlgen-ruby/Makefile rlgen-dot/Makefile rlgen-csharp/Makefile doc/Makefile test/Makefile"
+ac_config_files="$ac_config_files Makefile ragel/Makefile doc/Makefile test/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
case $ac_config_target in
"ragel/config.h") CONFIG_HEADERS="$CONFIG_HEADERS ragel/config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;;
"ragel/Makefile") CONFIG_FILES="$CONFIG_FILES ragel/Makefile" ;;
- "redfsm/Makefile") CONFIG_FILES="$CONFIG_FILES redfsm/Makefile" ;;
- "rlgen-cd/Makefile") CONFIG_FILES="$CONFIG_FILES rlgen-cd/Makefile" ;;
- "rlgen-java/Makefile") CONFIG_FILES="$CONFIG_FILES rlgen-java/Makefile" ;;
- "rlgen-ruby/Makefile") CONFIG_FILES="$CONFIG_FILES rlgen-ruby/Makefile" ;;
- "rlgen-dot/Makefile") CONFIG_FILES="$CONFIG_FILES rlgen-dot/Makefile" ;;
- "rlgen-csharp/Makefile") CONFIG_FILES="$CONFIG_FILES rlgen-csharp/Makefile" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
fi
dnl write output files
-AC_OUTPUT(Makefile common/Makefile ragel/Makefile redfsm/Makefile rlgen-cd/Makefile rlgen-java/Makefile rlgen-ruby/Makefile rlgen-dot/Makefile rlgen-csharp/Makefile doc/Makefile test/Makefile)
+AC_OUTPUT(Makefile ragel/Makefile doc/Makefile test/Makefile)
echo "configuration of ragel complete"
java-main.cpp java-javacodegen.cpp \
ruby-main.cpp ruby-codegen.cpp ruby-tabcodegen.cpp ruby-ftabcodegen.cpp \
ruby-flatcodegen.cpp ruby-fflatcodegen.cpp ruby-rbx-gotocodegen.cpp \
- csharp-main.cpp csharp-fsmcodegen.cpp \
- csharp-tabcodegen.cpp csharp-ftabcodegen.cpp csharp-flatcodegen.cpp \
- csharp-fflatcodegen.cpp csharp-gotocodegen.cpp csharp-fgotocodegen.cpp \
- csharp-ipgotocodegen.cpp csharp-splitcodegen.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-main.cpp dot-gvdotgen.cpp
GEN_SRC = version.h rlscan.cpp rlparse.h rlparse.cpp \
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-fflatcodegen.h"
+#include "ragel.h"
+#include "cs-fflatcodegen.h"
#include "redfsm.h"
#include "gendata.h"
#define _FFLATCODEGEN_H
#include <iostream>
-#include "csharp-flatcodegen.h"
+#include "cs-flatcodegen.h"
/* Forwards. */
struct CodeGenData;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-fgotocodegen.h"
+#include "ragel.h"
+#include "cs-fgotocodegen.h"
#include "redfsm.h"
#include "gendata.h"
#include "bstmap.h"
#define _FGOTOCODEGEN_H
#include <iostream>
-#include "csharp-gotocodegen.h"
+#include "cs-gotocodegen.h"
/* Forwards. */
struct CodeGenData;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-flatcodegen.h"
+#include "ragel.h"
+#include "cs-flatcodegen.h"
#include "redfsm.h"
#include "gendata.h"
#define _FLATCODEGEN_H
#include <iostream>
-#include "csharp-fsmcodegen.h"
+#include "cs-fsmcodegen.h"
/* Forwards. */
struct CodeGenData;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-fsmcodegen.h"
+#include "ragel.h"
+#include "cs-fsmcodegen.h"
#include "redfsm.h"
#include "gendata.h"
#include <sstream>
#include <string>
#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"
using std::ostream;
using std::ostringstream;
using std::cerr;
using std::endl;
+using std::istream;
+using std::ifstream;
+using std::ostream;
+using std::ios;
+using std::cin;
+using std::cout;
+using std::cerr;
+using std::endl;
+
+/* Invoked by the parser when the root element is opened. */
+ostream *csharpOpenOutput( const char *inputFile )
+{
+ if ( hostLang->lang != HostLang::CSharp ) {
+ error() << "this code generator is for C# only" << endl;
+ exit(1);
+ }
+
+ /* If the output format is code and no output file name is given, then
+ * make a default. */
+ if ( outputFileName == 0 ) {
+ const char *ext = findFileExtension( inputFile );
+ if ( ext != 0 && strcmp( ext, ".rh" ) == 0 )
+ outputFileName = fileNameFromStem( inputFile, ".h" );
+ else
+ outputFileName = fileNameFromStem( inputFile, ".cs" );
+ }
+
+ /* Make sure we are not writing to the same file as the input file. */
+ if ( outputFileName != 0 && strcmp( inputFile, outputFileName ) == 0 ) {
+ error() << "output file \"" << outputFileName <<
+ "\" is the same as the input file" << endl;
+ }
+
+ if ( outputFileName != 0 ) {
+ /* Create the filter on the output and open it. */
+ outFilter = new output_filter( outputFileName );
+ outFilter->open( outputFileName, ios::out|ios::trunc );
+ if ( !outFilter->is_open() ) {
+ error() << "error opening " << outputFileName << " for writing" << endl;
+ exit(1);
+ }
+
+ /* Open the output stream, attaching it to the filter. */
+ outStream = new ostream( outFilter );
+ }
+ else {
+ /* Writing out ot std out. */
+ outStream = &cout;
+ }
+ return outStream;
+}
+
+/* Invoked by the parser when a ragel definition is opened. */
+CodeGenData *csharpMakeCodeGen( const char *sourceFileName, const char *fsmName,
+ ostream &out, bool wantComplete )
+{
+ CodeGenData *codeGen = 0;
+
+ switch ( codeStyle ) {
+ case GenTables:
+ codeGen = new CSharpTabCodeGen(out);
+ break;
+ case GenFTables:
+ codeGen = new CSharpFTabCodeGen(out);
+ break;
+ case GenFlat:
+ codeGen = new CSharpFlatCodeGen(out);
+ break;
+ case GenFFlat:
+ codeGen = new CSharpFFlatCodeGen(out);
+ break;
+ case GenGoto:
+ codeGen = new CSharpGotoCodeGen(out);
+ break;
+ case GenFGoto:
+ codeGen = new CSharpFGotoCodeGen(out);
+ break;
+ case GenIpGoto:
+ codeGen = new CSharpIpGotoCodeGen(out);
+ break;
+ case GenSplit:
+ codeGen = new CSharpSplitCodeGen(out);
+ break;
+ }
+
+ codeGen->sourceFileName = sourceFileName;
+ codeGen->fsmName = fsmName;
+ codeGen->wantComplete = wantComplete;
+
+ return codeGen;
+}
+
void csharpLineDirective( ostream &out, const char *fileName, int line )
{
if ( noLineDirectives )
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-ftabcodegen.h"
+#include "ragel.h"
+#include "cs-ftabcodegen.h"
#include "redfsm.h"
#include "gendata.h"
#define _FTABCODEGEN_H
#include <iostream>
-#include "csharp-tabcodegen.h"
+#include "cs-tabcodegen.h"
/* Forwards. */
struct CodeGenData;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-gotocodegen.h"
+#include "ragel.h"
+#include "cs-gotocodegen.h"
#include "redfsm.h"
#include "bstmap.h"
#include "gendata.h"
#define _GOTOCODEGEN_H
#include <iostream>
-#include "csharp-fsmcodegen.h"
+#include "cs-fsmcodegen.h"
/* Forwards. */
struct CodeGenData;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-ipgotocodegen.h"
+#include "ragel.h"
+#include "cs-ipgotocodegen.h"
#include "redfsm.h"
#include "gendata.h"
#include "bstmap.h"
#define _IPGCODEGEN_H
#include <iostream>
-#include "csharp-gotocodegen.h"
+#include "cs-gotocodegen.h"
/* Forwards. */
struct CodeGenData;
/*
- * Copyright 2001-2006 Adrian Thurston <thurston@complang.org>
+ * Copyright 2001-2007 Adrian Thurston <thurston@complang.org>
*/
/* This file is part of Ragel.
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef _RLCODEGEN_H
-#define _RLCODEGEN_H
-
+#include <stdlib.h>
+#include <string.h>
#include <stdio.h>
#include <iostream>
-#include "config.h"
-#include "avltree.h"
-#include "vector.h"
-#include "config.h"
-#include "common.h"
-
-extern CodeStyleEnum codeStyle;
-
+#include <fstream>
+#include <unistd.h>
-/* IO filenames and stream. */
-extern bool graphvizDone;
-
-extern int gblErrorCount;
-
-/* Options. */
-extern int numSplitPartitions;
-extern bool noLineDirectives;
-
-std::ostream &error();
+#include "common.h"
+#include "ragel.h"
+#include "xmlparse.h"
+#include "pcheck.h"
+#include "vector.h"
+#include "version.h"
-#endif /* _RLCODEGEN_H */
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-splitcodegen.h"
+#include "ragel.h"
+#include "cs-splitcodegen.h"
#include "gendata.h"
#include <assert.h>
#ifndef _SPLITCODEGEN_H
#define _SPLITCODEGEN_H
-#include "csharp-ipgotocodegen.h"
+#include "cs-ipgotocodegen.h"
class CSharpSplitCodeGen : public CSharpIpGotoCodeGen
{
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "csharp-rlgen-csharp.h"
-#include "csharp-tabcodegen.h"
+#include "ragel.h"
+#include "cs-tabcodegen.h"
#include "redfsm.h"
#include "gendata.h"
#define _TABCODEGEN_H
#include <iostream>
-#include "csharp-fsmcodegen.h"
+#include "cs-fsmcodegen.h"
/* Forwards. */
struct CodeGenData;
+++ /dev/null
-/*
- * 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
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <iostream>
-#include <fstream>
-#include <unistd.h>
-
-#include "common.h"
-#include "csharp-rlgen-csharp.h"
-#include "xmlparse.h"
-#include "pcheck.h"
-#include "vector.h"
-#include "version.h"
-
-/* Code generators. */
-#include "csharp-tabcodegen.h"
-#include "csharp-ftabcodegen.h"
-#include "csharp-flatcodegen.h"
-#include "csharp-fflatcodegen.h"
-#include "csharp-gotocodegen.h"
-#include "csharp-fgotocodegen.h"
-#include "csharp-ipgotocodegen.h"
-#include "csharp-splitcodegen.h"
-
-using std::istream;
-using std::ifstream;
-using std::ostream;
-using std::ios;
-using std::cin;
-using std::cout;
-using std::cerr;
-using std::endl;
-
-/* Target language and output style. */
-extern CodeStyleEnum codeStyle;
-
-/* Io globals. */
-extern istream *inStream;
-extern ostream *outStream;
-extern output_filter *outFilter;
-extern const char *outputFileName;
-
-/* Graphviz dot file generation. */
-extern bool graphvizDone;
-
-extern int numSplitPartitions;
-extern bool noLineDirectives;
-
-/*
- * Callbacks invoked by the XML data parser.
- */
-
-/* Invoked by the parser when the root element is opened. */
-ostream *csharpOpenOutput( const char *inputFile )
-{
- if ( hostLang->lang != HostLang::CSharp ) {
- error() << "this code generator is for C# only" << endl;
- exit(1);
- }
-
- /* If the output format is code and no output file name is given, then
- * make a default. */
- if ( outputFileName == 0 ) {
- const char *ext = findFileExtension( inputFile );
- if ( ext != 0 && strcmp( ext, ".rh" ) == 0 )
- outputFileName = fileNameFromStem( inputFile, ".h" );
- else
- outputFileName = fileNameFromStem( inputFile, ".cs" );
- }
-
- /* Make sure we are not writing to the same file as the input file. */
- if ( outputFileName != 0 && strcmp( inputFile, outputFileName ) == 0 ) {
- error() << "output file \"" << outputFileName <<
- "\" is the same as the input file" << endl;
- }
-
- if ( outputFileName != 0 ) {
- /* Create the filter on the output and open it. */
- outFilter = new output_filter( outputFileName );
- outFilter->open( outputFileName, ios::out|ios::trunc );
- if ( !outFilter->is_open() ) {
- error() << "error opening " << outputFileName << " for writing" << endl;
- exit(1);
- }
-
- /* Open the output stream, attaching it to the filter. */
- outStream = new ostream( outFilter );
- }
- else {
- /* Writing out ot std out. */
- outStream = &cout;
- }
- return outStream;
-}
-
-/* Invoked by the parser when a ragel definition is opened. */
-CodeGenData *csharpMakeCodeGen( const char *sourceFileName, const char *fsmName,
- ostream &out, bool wantComplete )
-{
- CodeGenData *codeGen = 0;
-
- switch ( codeStyle ) {
- case GenTables:
- codeGen = new CSharpTabCodeGen(out);
- break;
- case GenFTables:
- codeGen = new CSharpFTabCodeGen(out);
- break;
- case GenFlat:
- codeGen = new CSharpFlatCodeGen(out);
- break;
- case GenFFlat:
- codeGen = new CSharpFFlatCodeGen(out);
- break;
- case GenGoto:
- codeGen = new CSharpGotoCodeGen(out);
- break;
- case GenFGoto:
- codeGen = new CSharpFGotoCodeGen(out);
- break;
- case GenIpGoto:
- codeGen = new CSharpIpGotoCodeGen(out);
- break;
- case GenSplit:
- codeGen = new CSharpSplitCodeGen(out);
- break;
- }
-
- codeGen->sourceFileName = sourceFileName;
- codeGen->fsmName = fsmName;
- codeGen->wantComplete = wantComplete;
-
- return codeGen;
-}
typedef Vector<const char *> ArgsVector;
extern ArgsVector includePaths;
+extern CodeStyleEnum codeStyle;
+
+/* IO filenames and stream. */
+extern bool graphvizDone;
+
+/* Options. */
+extern int numSplitPartitions;
+extern bool noLineDirectives;
+
+std::ostream &error();
+
+/* Target language and output style. */
+extern CodeStyleEnum codeStyle;
+
+/* Io globals. */
+extern std::istream *inStream;
+extern std::ostream *outStream;
+extern output_filter *outFilter;
+extern const char *outputFileName;
+
+/* Graphviz dot file generation. */
+extern bool graphvizDone;
+
+extern int numSplitPartitions;
+extern bool noLineDirectives;
+
+
#endif /* _RAGEL_H */