36 const std::string &module,
37 const bool keep_file_local)
55 std::istream &instream,
56 const std::string &path)
84 const std::string &module)
86 return typecheck(symbol_table, module,
true);
145 return util_make_unique<statement_list_languaget>();
150 return util_make_unique<statement_list_languaget>();
155 return "Statement List";
160 return "Statement List Language by Siemens";
Base class for all expressions.
mstreamt & result() const
message_handlert & get_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)
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 modules_provided(std::set< std::string > &modules) override
void show_parse(std::ostream &out) override
Prints the parse tree to the given output stream.
object_factory_parameterst params
std::set< std::string > extensions() const override
std::unique_ptr< languaget > new_language() override
statement_list_languaget()
bool generate_support_functions(symbol_tablet &symbol_table) override
Currently unused.
std::string id() const override
bool from_type(const typet &type, std::string &code, const namespacet &ns) override
Formats the given type in a language-specific way.
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.
~statement_list_languaget() override
statement_list_parse_treet parse_tree
bool from_expr(const exprt &expr, std::string &code, const namespacet &ns) override
Formats the given expression in a language-specific way.
std::string description() const override
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 can_keep_file_local() override
Is it possible to call three-argument typecheck() on this object?
bool type_to_name(const typet &type, std::string &name, const namespacet &ns) override
Encodes the given type in a language-specific way.
void set_language_options(const optionst &options) override
Sets language specific options.
void clear()
Removes all functions and function blocks from the parse tree.
void clear() override
Removes all functions and function blocks from the parse tree and clears the internal state of the pa...
void swap_tree(statement_list_parse_treet &other)
Swaps the contents of the parse tree of this instance with other.
bool parse() override
Starts the parsing process and saves the result inside of this instance's parse tree.
The type of an expression, extends irept.
std::string expr2stl(const exprt &expr, const namespacet &ns)
Converts a given expression to human-readable STL code.
std::string type2stl(const typet &type, const namespacet &ns)
Converts a given type to human-readable STL code.
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.
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 Language Entry Point.
std::unique_ptr< languaget > new_statement_list_language()
Statement List Language Interface.
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.
Statement List Language Parse Tree Output.
statement_list_parsert statement_list_parser
Instance of the parser, used by other modules.
Statement List Language Parser.
void statement_list_scanner_init()
Defined in scanner.l.
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.
Statement List Language Type Checking.