X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTPushLexer.hh;fp=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTPushLexer.hh;h=ff61561ec174e4d33c96bf16261caae5c20d02db;hb=30060cffed61b88fe53e4d6386b606050d6dfda0;hp=0000000000000000000000000000000000000000;hpb=e6927665462cbbace76cff1b17d4f8badcb44eda;p=helm.git diff --git a/helm/DEVEL/mathml_editor/src/TPushLexer.hh b/helm/DEVEL/mathml_editor/src/TPushLexer.hh new file mode 100644 index 000000000..ff61561ec --- /dev/null +++ b/helm/DEVEL/mathml_editor/src/TPushLexer.hh @@ -0,0 +1,35 @@ + +#ifndef __TPushLexer_hh__ +#define __TPushLexer_hh__ + +#include + +#include "APushLexer.hh" + +class TPushLexer : public APushLexer +{ +public: + TPushLexer(class APushParser&); + virtual ~TPushLexer() { }; + + virtual void push(char); + virtual void reset(void); + virtual bool error(void) const; + +private: + enum State + { + ACCEPT, + ESCAPE, + MACRO, + IGNORE_SPACE, + PARAMETER + }; + + void transaction(char, State); + + State state; + std::string buffer; +}; + +#endif // __TPushLexer_hh__