]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/mathml_editor/src/TPushLexer.hh
Initial revision
[helm.git] / helm / DEVEL / mathml_editor / src / TPushLexer.hh
diff --git a/helm/DEVEL/mathml_editor/src/TPushLexer.hh b/helm/DEVEL/mathml_editor/src/TPushLexer.hh
new file mode 100644 (file)
index 0000000..ff61561
--- /dev/null
@@ -0,0 +1,35 @@
+
+#ifndef __TPushLexer_hh__
+#define __TPushLexer_hh__
+
+#include <string>
+
+#include "APushLexer.hh"
+
+class TPushLexer : public APushLexer
+{
+public:
+  TPushLexer(class APushParser&);
+  virtual ~TPushLexer() { };
+
+  virtual void push(char);
+  virtual void reset(void);
+  virtual bool error(void) const;
+
+private:
+  enum State
+    {
+      ACCEPT,
+      ESCAPE,
+      MACRO,
+      IGNORE_SPACE,
+      PARAMETER
+    };
+
+  void transaction(char, State);
+
+  State state;
+  std::string buffer;
+};
+
+#endif // __TPushLexer_hh__