Don't segfault when there are no machine instantiations.
[external/ragel.git] / ragel / cscodegen.h
index 6b996ce..0471ea9 100644 (file)
@@ -21,8 +21,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
  */
 
-#ifndef _FSMCODEGEN_H
-#define _FSMCODEGEN_H
+#ifndef _CSCODEGEN_H
+#define _CSCODEGEN_H
 
 #include <iostream>
 #include <string>
@@ -48,12 +48,7 @@ struct RedAction;
 struct LongestMatch;
 struct LongestMatchPart;
 
-inline string itoa( int i )
-{
-       char buf[16];
-       sprintf( buf, "%i", i );
-       return buf;
-}
+string itoa( int i );
 
 /*
  * class CSharpFsmCodeGen
@@ -66,6 +61,9 @@ public:
 
        virtual void finishRagelDef();
        virtual void writeInit();
+       virtual void writeStart();
+       virtual void writeFirstFinal();
+       virtual void writeError();
 
 protected:
        string FSM_NAME();
@@ -94,10 +92,10 @@ protected:
 
        string P();
        string PE();
-       string EOFV();
+       string vEOF();
 
        string ACCESS();
-       string CS();
+       string vCS();
        string STACK();
        string TOP();
        string TOKSTART();
@@ -204,4 +202,4 @@ public:
 
 #define MAX(a, b) (a > b ? a : b)
 
-#endif /* _FSMCODEGEN_H */
+#endif