Go to the documentation of this file.
26 std::unique_ptr<languaget> language = (mode == ID_unknown)
30 language,
"could not retrieve language for mode '" +
id2string(mode) +
"'");
92 const std::string &src)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
std::string type_to_name(const namespacet &ns, const irep_idt &identifier, const typet &type)
The type of an expression, extends irept.
exprt to_expr(const namespacet &ns, const irep_idt &identifier, const std::string &src)
std::unique_ptr< languaget > get_language_from_mode(const irep_idt &mode)
Get the language corresponding to the given mode.
Base class for all expressions.
std::string from_type(const namespacet &ns, const irep_idt &identifier, const typet &type)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
const std::string & id2string(const irep_idt &d)
virtual bool from_type(const typet &type, std::string &code, const namespacet &ns)
Formats the given type in a language-specific way.
virtual bool from_expr(const exprt &expr, std::string &code, const namespacet &ns)
Formats the given expression in a language-specific way.
virtual void set_message_handler(message_handlert &_message_handler)
virtual bool to_expr(const std::string &code, const std::string &module, exprt &expr, const namespacet &ns)=0
Parses the given string into an expression.
std::unique_ptr< languaget > get_language_from_identifier(const namespacet &ns, const irep_idt &identifier)
Get the language corresponding to the mode of the given identifier's symbol.
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
irep_idt module
Name of module the symbol belongs to.
null_message_handlert null_message_handler
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
virtual bool type_to_name(const typet &type, std::string &name, const namespacet &ns)
Encodes the given type in a language-specific way.
std::string from_expr_using_mode(const namespacet &ns, const irep_idt &mode, const exprt &expr)
Formats an expression using the given namespace, using the given mode to retrieve the language printe...
std::unique_ptr< languaget > get_default_language()
Returns the default language.