27 if(c.get_statement()!=ID_label)
48 static_cast<const exprt&>(
find(ID_declarator))));
54 if(proc_type==
"builtin")
56 else if(proc_type==
"spec")
62 symbol.
type=symbol_type;
66 static_cast<const codet&>(
find(ID_value))));
77 throw "return label "+returns.
get_string(ID_label)+
" not found";
79 throw "throw label "+
throws.get_string(ID_label)+
" not found";
86 out <<
"Declarator: " <<
find(ID_declarator).
pretty() <<
"\n";
87 out <<
"Returns: " <<
find(ID_return).
pretty() <<
"\n";
88 out <<
"Throws: " <<
find(ID_throw).
pretty() <<
"\n";
89 out <<
"Value: " <<
find(ID_value).
pretty() <<
"\n";
94 for(itemst::const_iterator
const irep_idt & get_statement() const
irep_idt name
The unique identifier.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
irep_idt mode
Language mode.
void clear()
Zero initialise a symbol object.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const irep_idt & get_identifier() const
code_operandst & statements()
void to_symbol(symbolt &symbol) const
exprt value
Initial value of symbol.
typet & type()
Return the type of the expression.
codet representation of an expression statement.
A side_effect_exprt representation of a side effect that throws an exception.
const irep_idt & get(const irep_namet &name) const
codet representation of a label for branch targets.
Base class for tree-like data structures with sharing.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void output(std::ostream &out) const
static bool insert_at_label(const codet &code, const irep_idt &label, code_blockt &dest)
typet type
Type of symbol.
source_locationt location
Source code location of definition of symbol.
irep_idt base_name
Base (non-scoped) name.
const source_locationt & source_location() const
The NIL type, i.e., an invalid type, no value.
const std::string & get_string(const irep_namet &name) const
A codet representing sequential composition of program statements.
const irep_idt & get_label() const
Expression to hold a symbol (variable)
const code_blockt & to_code_block(const codet &code)
Data structure for representing an arbitrary statement in a program.
codet representation of a "return from a function" statement.
const code_labelt & to_code_label(const codet &code)
void output(std::ostream &) const
const irept & find(const irep_namet &name) const