]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/mathml_editor/src/TPushLexer.hh
Now it's possible to insert and delete control sequence with arguments
[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 void flush(void);
18   virtual bool error(void) const;
19
20 private:
21   enum State
22     {
23       ACCEPT,
24       ESCAPE,
25       MACRO,
26       IGNORE_SPACE,
27       PARAMETER
28     };
29
30   void transaction(char, State);
31
32   State state;
33   std::string buffer;
34 };
35
36 #endif // __TPushLexer_hh__