]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/mathml_editor/src/TPushLexer.hh
Added the special deletion. Pressing backspace, the user has a normal deletion
[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 ALogger&, class APushParser&);
13   virtual ~TPushLexer() { };
14
15   virtual void push(char);
16   virtual void drop(bool);
17   virtual void reset(void);
18   virtual void flush(void);
19   virtual bool error(void) const;
20
21 private:
22   enum State
23     {
24       ACCEPT,
25       ESCAPE,
26       MACRO,
27       IGNORE_SPACE,
28       PARAMETER
29     };
30
31   void transaction(char, State);
32
33   State state;
34   std::string buffer;
35 };
36
37 #endif // __TPushLexer_hh__