X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTLexerPush.hh;fp=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTLexerPush.hh;h=f47def4955ef6399ed65b38c258c0ce87e556f27;hb=89262281b6e83bd2321150f81f1a0583645eb0c8;hp=0000000000000000000000000000000000000000;hpb=b1fb6b8e1767d775bc452303629e95941d142bea;p=helm.git diff --git a/helm/DEVEL/mathml_editor/src/TLexerPush.hh b/helm/DEVEL/mathml_editor/src/TLexerPush.hh new file mode 100644 index 000000000..f47def495 --- /dev/null +++ b/helm/DEVEL/mathml_editor/src/TLexerPush.hh @@ -0,0 +1,31 @@ + +#include + +#include "TToken.hh" + +class TLexerPush +{ +public: + TLexerPush(void); + + void push(TChar); + TToken pop(void); + TToken front(void) const; + bool ambiguous(void) const; + bool pending(void) const; + bool empty(void) const; + + class EmptyBuffer { }; + +private: + enum State + { + ACCEPT, + ESCAPE, + CONTROL, + IGNORE_SPACE + }; + + State state; + std::deque tokens; +};