Go to the documentation of this file.
27 for(scopest::const_reverse_iterator it=
scopes.rbegin();
31 scopet::name_mapt::const_iterator n_it=
32 it->name_map.find(scope_name);
34 if(n_it!=it->name_map.end())
36 identifier=n_it->second.prefixed_name;
37 return n_it->second.id_class;
60 const std::string scope_name=
65 if(prefixed_name!=tag.
get(ID_identifier))
72 tag.
set(ID_identifier, prefixed_name);
93 new_declarator.
build(declarator);
104 ansi_c_declaration.
declarators().push_back(new_declarator);
113 if(!base_name.
empty())
119 bool force_root_scope=
false;
123 if(new_declarator.
type().
id()==ID_code &&
126 force_root_scope=
true;
130 force_root_scope=
true;
140 irep_idt prefixed_name=force_root_scope?
143 new_declarator.
set_name(prefixed_name);
154 ansi_c_declaration.
declarators().push_back(new_declarator);
159 if(type.
id()==ID_typedef)
161 else if(type.
id()==ID_struct ||
162 type.
id()==ID_union ||
163 type.
id()==ID_c_enum)
165 else if(type.
id()==ID_merged_type)
ansi_c_parsert ansi_c_parser
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const typet & subtype() const
const declaratorst & declarators() const
void add_declarator(exprt &declaration, irept &declarator)
The type of an expression, extends irept.
Base class for all expressions.
void set_is_global(bool is_global)
ansi_c_id_classt lookup(const irep_idt &base_name, irep_idt &identifier, bool tag, bool label)
typet & type()
Return the type of the expression.
bool get_is_parameter() const
static ansi_c_id_classt get_class(const typet &type)
irep_idt get_base_name() const
const std::string & id2string(const irep_idt &d)
const irep_idt & id() const
ansi_c_declarationt & to_ansi_c_declaration(exprt &expr)
bool get_is_member() const
void parse_error(const std::string &message, const std::string &before)
#define forall_subtypes(it, type)
void add_tag_with_body(irept &tag)
const std::string & get_string(const irep_namet &name) const
void set_name(const irep_idt &name)
const irep_idt & get(const irep_namet &name) const
void set(const irep_namet &name, const irep_idt &value)
int yyansi_cerror(const std::string &error)
ansi_c_id_classt id_class
There are a large number of kinds of tree structured or tree-like data in CPROVER.