39 std::istream &instream,
40 const std::string &path,
41 std::ostream &outstream)
51 std::istream &instream,
52 const std::string &path)
58 std::ostringstream o_preprocessed;
63 std::istringstream i_preprocessed(o_preprocessed.str());
69 std::istringstream codestr(code);
105 const std::string &module,
106 const bool keep_file_local)
143 return util_make_unique<ansi_c_languaget>();
174 const std::string &code,
183 std::istringstream i_preprocessed(
184 "void __my_expression = (void) (\n"+code+
"\n);");
212 if(expr.
id()==ID_typecast &&
213 expr.
type().
id()==ID_empty &&
bool ansi_c_entry_point(symbol_tablet &symbol_table, message_handlert &message_handler, const c_object_factory_parameterst &object_factory_parameters)
void ansi_c_internal_additions(std::string &code)
std::unique_ptr< languaget > new_ansi_c_language()
ansi_c_parsert ansi_c_parser
void ansi_c_scanner_init()
bool ansi_c_typecheck(ansi_c_parse_treet &ansi_c_parse_tree, symbol_tablet &symbol_table, const std::string &module, message_handlert &message_handler)
ANSI-C Language Type Checking.
bool c_preprocess(std::istream &instream, std::ostream &outstream, message_handlert &message_handler)
ANSI-C preprocessing.
bool preprocess(std::istream &instream, const std::string &path, std::ostream &outstream) override
ANSI-C preprocessing.
~ansi_c_languaget() override
std::set< std::string > extensions() const override
bool typecheck(symbol_tablet &symbol_table, const std::string &module, const bool keep_file_local) override
typecheck without removing specified entries from the symbol table
void show_parse(std::ostream &out) override
bool parse(std::istream &instream, const std::string &path) override
bool from_type(const typet &type, std::string &code, const namespacet &ns) override
Formats the given type in a language-specific way.
bool to_expr(const std::string &code, const std::string &module, exprt &expr, const namespacet &ns) override
Parses the given string into an expression.
bool generate_support_functions(symbol_tablet &symbol_table) override
Create language-specific support functions, such as __CPROVER_start, __CPROVER_initialize and languag...
bool from_expr(const exprt &expr, std::string &code, const namespacet &ns) override
Formats the given expression in a language-specific way.
void modules_provided(std::set< std::string > &modules) override
bool type_to_name(const typet &type, std::string &name, const namespacet &ns) override
Encodes the given type in a language-specific way.
ansi_c_parse_treet parse_tree
c_object_factory_parameterst object_factory_params
void swap(ansi_c_parse_treet &other)
void output(std::ostream &out) const
bool ts_18661_3_Floatn_types
ansi_c_parse_treet parse_tree
virtual void clear() override
virtual bool parse() override
struct configt::ansi_ct ansi_c
Base class for all expressions.
typet & type()
Return the type of the expression.
const irep_idt & id() const
mstreamt & result() const
message_handlert & get_message_handler()
virtual void set_message_handler(message_handlert &_message_handler)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
void set_file(const irep_idt &file)
void set_line_no(unsigned _line_no)
The type of an expression, extends irept.
std::string type2c(const typet &type, const namespacet &ns)
std::string expr2c(const exprt &expr, const namespacet &ns)
std::string get_base_name(const std::string &in, bool strip_suffix)
cleans a filename from path and extension
bool linking(symbol_tablet &dest_symbol_table, symbol_tablet &new_symbol_table, message_handlert &message_handler)
void remove_internal_symbols(symbol_tablet &symbol_table, message_handlert &mh, const bool keep_file_local)
Removes internal symbols from a symbol table A symbol is EXPORTED if it is a.
Remove symbols that are internal only.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
bool ts_18661_3_Floatn_types
static std::string type2name(const typet &type, const namespacet &ns, symbol_numbert &symbol_number)