Go to the documentation of this file.
38 const std::string &module,
39 const bool keep_file_local)
57 std::istream &instream,
58 const std::string &path)
86 const std::string &module)
88 return typecheck(symbol_table, module,
true);
147 return util_make_unique<statement_list_languaget>();
152 return util_make_unique<statement_list_languaget>();
157 return "Statement List";
162 return "Statement List Language by Siemens";
std::string get_base_name(const std::string &in, bool strip_suffix)
cleans a filename from path and extension
bool type_to_name(const typet &type, std::string &name, const namespacet &ns) override
Encodes the given type in a language-specific way.
bool linking(symbol_tablet &dest_symbol_table, const symbol_tablet &new_symbol_table, message_handlert &message_handler)
Merges the symbol table new_symbol_table into dest_symbol_table, renaming symbols from new_symbol_tab...
bool generate_support_functions(symbol_tablet &symbol_table) override
Currently unused.
statement_list_parsert statement_list_parser
Instance of the parser, used by other modules.
The type of an expression, extends irept.
bool can_keep_file_local() override
Is it possible to call three-argument typecheck() on this object?
bool parse() override
Starts the parsing process and saves the result inside of this instance's parse tree.
object_factory_parameterst params
std::set< std::string > extensions() const override
Base class for all expressions.
bool parse(std::istream &instream, const std::string &path) override
Parses input given by instream and saves this result to this instance's parse tree.
bool from_type(const typet &type, std::string &code, const namespacet &ns) override
Formats the given type in a language-specific way.
void show_parse(std::ostream &out) override
Prints the parse tree to the given output stream.
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.
void output_parse_tree(std::ostream &out, const statement_list_parse_treet &parse_tree)
Prints the given Statement List parse tree in a human-readable form to the given output stream.
void swap_tree(statement_list_parse_treet &other)
Swaps the contents of the parse tree of this instance with other.
statement_list_parse_treet parse_tree
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
mstreamt & result() const
bool to_expr(const std::string &code, const std::string &module, exprt &expr, const namespacet &ns) override
Parses the given string into an expression.
void statement_list_scanner_init()
Defined in scanner.l.
std::string type2stl(const typet &type, const namespacet &ns)
Converts a given type to human-readable STL code.
bool statement_list_typecheck(const statement_list_parse_treet &parse_tree, symbol_tablet &symbol_table, const std::string &module, message_handlert &message_handler)
Create a new statement_list_typecheckt object and perform a type check to fill the symbol table.
std::string description() const override
std::unique_ptr< languaget > new_language() override
~statement_list_languaget() override
void modules_provided(std::set< std::string > &modules) override
bool from_expr(const exprt &expr, std::string &code, const namespacet &ns) override
Formats the given expression in a language-specific way.
void clear() override
Removes all functions and function blocks from the parse tree and clears the internal state of the pa...
message_handlert & get_message_handler()
std::string id() const override
void clear()
Removes all functions and function blocks from the parse tree.
std::unique_ptr< languaget > new_statement_list_language()
bool typecheck(symbol_tablet &symbol_table, const std::string &module, const bool keep_file_local) override
Converts the current parse tree into a symbol table.
bool statement_list_entry_point(symbol_tablet &symbol_table, message_handlert &message_handler)
Creates a new entry point for the Statement List language.
statement_list_languaget()
std::string expr2stl(const exprt &expr, const namespacet &ns)
Converts a given expression to human-readable STL code.
void set_language_options(const optionst &options) override
Sets language specific options.
void set_file(const irep_idt &file)
void set_line_no(unsigned _line_no)