2#define OPALX_Token_HH 1
56 Token(
const std::string&
file,
int line,
const std::string& lex,
double value);
60 Token(
const std::string&
file,
int line,
const std::string& lex,
int value);
68 bool isDel(
char del)
const;
72 bool isDel(
const char* del)
const;
96 bool isKey(
const char* key)
const;
119 const std::string&
getLex()
const;
125 const std::string&
getFile()
const;
132 void invalid(
const char*)
const;
std::ostream & operator<<(std::ostream &, const Token &)
Representation of a single input token.
bool isError() const
Test for error.
Type getType() const
Return the token type.
bool isString() const
Test for string.
bool isWord() const
Test for word.
bool isEOF() const
Test for end of file.
const std::string & getLex() const
Return the lexeme.
std::string getWord() const
Return word value.
bool isKey(const char *key) const
Test for keyword.
bool isDel() const
Test for any delimiter.
bool getBool() const
Return boolean value.
int getLine() const
Return the token's line number.
std::string getString() const
Return string value.
void invalid(const char *) const
bool isInteger() const
Test for integer.
double getReal() const
Return real value.
const Token & operator=(const Token &)
Type
Possible token types.
bool isReal() const
Test for real number.
int getInteger() const
Return integer value.
const std::string & getFile() const
Return the token's file name.