]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/mathml_editor/src/TPushLexer.hh
Initial revision
[helm.git] / helm / DEVEL / mathml_editor / src / TPushLexer.hh
1
2 #ifndef __TPushLexer_hh__
3 #define __TPushLexer_hh__
4
5 #include <string>
6
7 #include "APushLexer.hh"
8
9 class TPushLexer : public APushLexer
10 {
11 public:
12   TPushLexer(class APushParser&);
13   virtual ~TPushLexer() { };
14
15   virtual void push(char);
16   virtual void reset(void);
17   virtual bool error(void) const;
18
19 private:
20   enum State
21     {
22       ACCEPT,
23       ESCAPE,
24       MACRO,
25       IGNORE_SPACE,
26       PARAMETER
27     };
28
29   void transaction(char, State);
30
31   State state;
32   std::string buffer;
33 };
34
35 #endif // __TPushLexer_hh__