Go to the documentation of this file.
12 #ifndef CPROVER_UTIL_PARSER_H
13 #define CPROVER_UTIL_PARSER_H
63 virtual bool parse()=0;
71 const std::string &message,
72 const std::string &before);
142 #define newstack(x) _newstack(PARSER, (x))
144 #define parser_stack(x) (PARSER.stack[x])
145 #define stack_expr(x) (PARSER.stack[x])
146 #define stack_type(x) \
147 (static_cast<typet &>(static_cast<irept &>(PARSER.stack[x])))
149 #define YY_INPUT(buf, result, max_size) \
151 for(result=0; result<max_size;) \
154 if(!PARSER.read(ch)) \
166 PARSER.inc_line_no(); \
176 #define YY_USER_ACTION PARSER.advance_column(yyleng);
178 #endif // CPROVER_UTIL_PARSER_H
Class that provides messages with a built-in verbosity 'level'.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
unsigned previous_line_no
source_locationt source_location
void set_function(const irep_idt &function)
exprt & _newstack(parsert &parser, unsigned &x)
Base class for all expressions.
void set_working_directory(const irep_idt &cwd)
void set_function(const irep_idt &function)
void set_line(const irep_idt &line)
irep_idt get_file() const
unsigned get_column() const
void set_file(const irep_idt &file)
std::vector< exprt > stack
void parse_error(const std::string &message, const std::string &before)
void set_column(unsigned _column)
const irep_idt & get_file() const
std::string get_current_working_directory()
source_locationt & add_source_location()
unsigned get_line_no() const
void advance_column(unsigned token_width)
void set_file(const irep_idt &file)
void set_line_no(unsigned _line_no)
void set_source_location(exprt &e)