12 #ifndef CPROVER_CRANGLER_CTOKEN_H
13 #define CPROVER_CRANGLER_CTOKEN_H
33 PREPROCESSOR_DIRECTIVE,
50 void output(std::ostream &)
const;
54 return text == other_text;
59 return text == std::string(1, some_char);
64 return text != std::string(1, some_char);
70 return t.
kind == ctokent::IDENTIFIER;
75 return t.
kind == ctokent::SEPARATOR;
80 return t.
kind == ctokent::OPERATOR;
85 return t.
kind == ctokent::WS;
90 return t.
kind == ctokent::END_OF_FILE;
95 return t.
kind == ctokent::C_COMMENT || t.
kind == ctokent::CPP_COMMENT;
100 return t.
kind == ctokent::PREPROCESSOR_DIRECTIVE;
bool operator==(char some_char) const
void output(std::ostream &) const
bool operator!=(char some_char) const
bool operator==(const char *other_text) const
ctokent(kindt _kind, std::string _text)
enum { END_OF_FILE, INT_LIT, CHAR_LIT, FLOAT_LIT, STRING_LIT, C_COMMENT, CPP_COMMENT, IDENTIFIER, OPERATOR, WS, SEPARATOR, PREPROCESSOR_DIRECTIVE, UNKNOWN } kindt
static bool is_identifier(const ctokent &t)
static bool is_operator(const ctokent &t)
std::ostream & operator<<(std::ostream &, const ctokent &)
static bool is_separator(const ctokent &t)
static bool is_comment(const ctokent &t)
static bool is_preprocessor_directive(const ctokent &t)
static bool is_ws(const ctokent &t)
static bool is_eof(const ctokent &t)