Removed the now missing makefiles from the list of files to generate in the
[external/ragel.git] / ragel / ragel.h
index 8f539af..dbbb5de 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2003 Adrian Thurston <thurston@cs.queensu.ca>
+ *  Copyright 2001-2007 Adrian Thurston <thurston@complang.org>
  */
 
 /*  This file is part of Ragel.
@@ -26,7 +26,9 @@
 #include <iostream>
 #include <fstream>
 #include <string>
+#include "vector.h"
 #include "config.h"
+#include "common.h"
 
 #define PROGNAME "ragel"
 
@@ -45,42 +47,65 @@ enum MinimizeOpt {
        MinimizeEveryOp
 };
 
-
-/* IO filenames and stream. */
-extern char *outputFileName;
-extern std::istream *inStream;
-extern std::ostream *outStream;
-
 /* 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 int gblErrorCount;
-extern char machineMain[];
-
-/* Location in an input file. */
-struct InputLoc
-{
-       char *fileName;
-       int line;
-       int col;
+/* Error reporting format. */
+enum ErrorFormat {
+       ErrorFormatGNU,
+       ErrorFormatMSVC,
 };
 
+extern ErrorFormat errorFormat;
+extern int gblErrorCount;
+extern char mainMachine[];
+
+InputLoc makeInputLoc( const char *fileName, int line = 0, int col = 0 );
+std::ostream &operator<<( std::ostream &out, const InputLoc &loc );
+
 /* Error reporting. */
 std::ostream &error();
 std::ostream &error( const InputLoc &loc ); 
 std::ostream &warning( const InputLoc &loc ); 
 
-void scan( char *fileName, std::istream &input );
+struct XmlParser;
+
 void terminateAllParsers( );
-void checkMachines( );
-void writeMachines( std::ostream &out, std::string hostData, char *inputFileName );
-void xmlEscapeHost( std::ostream &out, char *data, int len );
+void xmlEscapeHost( std::ostream &out, char *data, long len );
+
+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;
 
-/* Size of the include stack. */
-#define INCLUDE_STACK_SIZE 32
 
 #endif /* _RAGEL_H */