+class ScriptToken {
+
+public:
+ enum Type {
+ COMMAND,
+ REGISTER,
+ IDENTIFIER,
+ LITERAL,
+ LABEL,
+ };
+
+ ScriptToken(const std::string &, Type);
+ explicit ScriptToken(Literal *);
+ ~ScriptToken();
+private:
+ ScriptToken(const ScriptToken &);
+ ScriptToken &operator =(const ScriptToken &);
+
+public:
+ Type GetType() const { return type; }
+ const std::string &RegisterName() const;
+ const std::string &CommandName() const;
+ const std::string &Identifier() const;
+ const std::string &Label() const;
+ const Literal *GetLiteral() const;
+
+private:
+ Literal *literal;
+ std::string str;
+ Type type;
+
+};
+