X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTToken.hh;fp=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTToken.hh;h=1cb6ca15e5848a8f9827d1fde8e52e9ab51910c4;hp=0000000000000000000000000000000000000000;hb=89262281b6e83bd2321150f81f1a0583645eb0c8;hpb=b1fb6b8e1767d775bc452303629e95941d142bea diff --git a/helm/DEVEL/mathml_editor/src/TToken.hh b/helm/DEVEL/mathml_editor/src/TToken.hh new file mode 100644 index 000000000..1cb6ca15e --- /dev/null +++ b/helm/DEVEL/mathml_editor/src/TToken.hh @@ -0,0 +1,38 @@ + +#ifndef __TToken_hh__ +#define __TToken_hh__ + +#include + +struct TToken +{ + enum TCat + { + BEGIN, + END, + SHIFT, + ALIGN, + EOL, + PARAMETER, + SUPERSCRIPT, + SUBSCRIPT, + SPACE, + LETTER, + DIGIT, + OTHER, + ACTIVE, + COMMENT, + CONTROL + }; + + TToken(TCat c) : category(c) { }; + TToken(TCat c, char ch) : category(c), value(std::string(1, ch)) { }; + TToken(TCat c, const std::string& v) : category(c), value(v) { }; + + bool operator==(const TToken& token) const { return category == token.category && value == token.value; }; + + TCat category; + std::string value; +}; + +#endif // __TToken_hh__