]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/mathml_editor/src/LPushLexer.hh
Added the special deletion. Pressing backspace, the user has a normal deletion
[helm.git] / helm / DEVEL / mathml_editor / src / LPushLexer.hh
1
2 #ifndef __LPushLexer_hh__
3 #define __LPushLexer_hh__
4
5 #include <string>
6
7 #include "APushLexer.hh"
8
9 class LPushLexer : public APushLexer
10 {
11 public:
12   LPushLexer(class ALogger&, class APushParser&);
13   virtual ~LPushLexer() { };
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       PARAMETER,
28       IDENTIFIER,
29       NUMBER
30     };
31
32   void transaction(char, State);
33
34   State state;
35   std::string buffer;
36 };
37
38 #endif // __LPushLexer_hh__