tizen 2.3.1 release
[external/ragel.git] / ragel / ragel.h
index dc9b2f4..2f4d6ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2007 Adrian Thurston <thurston@cs.queensu.ca>
+ *  Copyright 2001-2007 Adrian Thurston <thurston@complang.org>
  */
 
 /*  This file is part of Ragel.
 #include <string>
 #include "vector.h"
 #include "config.h"
+#include "common.h"
 
 #define PROGNAME "ragel"
 
+/* Target output style. */
+enum CodeStyle
+{
+       GenTables,
+       GenFTables,
+       GenFlat,
+       GenFFlat,
+       GenGoto,
+       GenFGoto,
+       GenIpGoto,
+       GenSplit
+};
+
 /* To what degree are machine minimized. */
 enum MinimizeLevel {
        MinimizeApprox,
@@ -46,12 +60,22 @@ enum MinimizeOpt {
        MinimizeEveryOp
 };
 
+/* Target implementation */
+enum RubyImplEnum
+{
+       MRI,
+       Rubinius
+};
+
 /* Options. */
 extern MinimizeLevel minimizeLevel;
 extern MinimizeOpt minimizeOpt;
-extern char *machineSpec, *machineName;
+extern const char *machineSpec, *machineName;
 extern bool printStatistics;
 extern bool wantDupsRemoved;
+extern bool generateDot;
+extern bool generateXML;
+extern RubyImplEnum rubyImpl;
 
 /* Error reporting format. */
 enum ErrorFormat {
@@ -63,14 +87,6 @@ extern ErrorFormat errorFormat;
 extern int gblErrorCount;
 extern char mainMachine[];
 
-/* Location in an input file. */
-struct InputLoc
-{
-       const char *fileName;
-       int line;
-       int col;
-};
-
 InputLoc makeInputLoc( const char *fileName, int line = 0, int col = 0 );
 std::ostream &operator<<( std::ostream &out, const InputLoc &loc );
 
@@ -79,11 +95,26 @@ std::ostream &error();
 std::ostream &error( const InputLoc &loc ); 
 std::ostream &warning( const InputLoc &loc ); 
 
-void terminateAllParsers( );
-void writeMachines( std::ostream &out, std::string hostData, char *inputFileName );
+struct XmlParser;
+
 void xmlEscapeHost( std::ostream &out, char *data, long len );
 
-typedef Vector<const char *> ArgsVector;
-extern ArgsVector includePaths;
+extern CodeStyle codeStyle;
+
+/* IO filenames and stream. */
+extern bool displayPrintables;
+extern int gblErrorCount;
+
+/* Options. */
+extern int numSplitPartitions;
+extern bool noLineDirectives;
+
+std::ostream &error();
+
+/* Target language and output style. */
+extern CodeStyle codeStyle;
+
+extern int numSplitPartitions;
+extern bool noLineDirectives;
 
-#endif /* _RAGEL_H */
+#endif