]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/mathml_editor/src/TLexerPush.hh
Initial revision
[helm.git] / helm / DEVEL / mathml_editor / src / TLexerPush.hh
1
2 #include <deque>
3
4 #include "TToken.hh"
5
6 class TLexerPush
7 {
8 public:
9   TLexerPush(void);
10
11   void   push(TChar);
12   TToken pop(void);
13   TToken front(void) const;
14   bool   ambiguous(void) const;
15   bool   pending(void) const;
16   bool   empty(void) const;
17
18   class EmptyBuffer { };
19
20 private:
21   enum State
22     {
23       ACCEPT,
24       ESCAPE,
25       CONTROL,
26       IGNORE_SPACE
27     };
28
29   State state;
30   std::deque<TToken> tokens;
31 };