CBMC
|
Implements the language interface for the Statement List language. More...
#include <statement_list_language.h>
Public Member Functions | |
void | set_language_options (const optionst &options, message_handlert &message_handler) override |
Sets language specific options. More... | |
bool | parse (std::istream &instream, const std::string &path, message_handlert &message_handler) override |
Parses input given by instream and saves this result to this instance's parse tree. More... | |
bool | generate_support_functions (symbol_table_baset &symbol_table, message_handlert &) override |
Currently unused. More... | |
bool | typecheck (symbol_table_baset &symbol_table, const std::string &module, message_handlert &message_handler, const bool keep_file_local) override |
Converts the current parse tree into a symbol table. More... | |
bool | typecheck (symbol_table_baset &symbol_table, const std::string &module, message_handlert &) override |
bool | can_keep_file_local () override |
Is it possible to call three-argument typecheck() on this object? More... | |
void | show_parse (std::ostream &out, message_handlert &) override |
Prints the parse tree to the given output stream. More... | |
~statement_list_languaget () override | |
statement_list_languaget () | |
bool | from_expr (const exprt &expr, std::string &code, const namespacet &ns) override |
Formats the given expression in a language-specific way. More... | |
bool | from_type (const typet &type, std::string &code, const namespacet &ns) override |
Formats the given type in a language-specific way. More... | |
bool | type_to_name (const typet &type, std::string &name, const namespacet &ns) override |
Encodes the given type in a language-specific way. More... | |
bool | to_expr (const std::string &code, const std::string &module, exprt &expr, const namespacet &ns, message_handlert &message_handler) override |
Parses the given string into an expression. More... | |
std::unique_ptr< languaget > | new_language () override |
std::string | id () const override |
std::string | description () const override |
std::set< std::string > | extensions () const override |
void | modules_provided (std::set< std::string > &modules) override |
Public Member Functions inherited from languaget | |
virtual bool | preprocess (std::istream &instream, const std::string &path, std::ostream &outstream, message_handlert &) |
virtual void | dependencies (const std::string &module, std::set< std::string > &modules) |
virtual void | methods_provided (std::unordered_set< irep_idt > &methods) const |
Should fill methods with the symbol identifiers of all methods this languaget can provide a body for, but doesn't populate that body in languaget::typecheck (i.e. More... | |
virtual void | convert_lazy_method (const irep_idt &function_id, symbol_table_baset &symbol_table, message_handlert &message_handler) |
Requests this languaget should populate the body of method function_id in symbol_table . More... | |
virtual bool | final (symbol_table_baset &symbol_table) |
Final adjustments, e.g. More... | |
virtual bool | interfaces (symbol_table_baset &symbol_table, message_handlert &message_handler) |
languaget () | |
virtual | ~languaget () |
Private Attributes | |
statement_list_parse_treet | parse_tree |
std::string | parse_path |
object_factory_parameterst | params |
Implements the language interface for the Statement List language.
Includes functions for parsing input streams and for converting the resulting parse tree into a symbol table.
Definition at line 23 of file statement_list_language.h.
|
override |
Definition at line 134 of file statement_list_language.cpp.
statement_list_languaget::statement_list_languaget | ( | ) |
Definition at line 130 of file statement_list_language.cpp.
|
overridevirtual |
Is it possible to call three-argument typecheck() on this object?
Reimplemented from languaget.
Definition at line 81 of file statement_list_language.cpp.
|
overridevirtual |
Implements languaget.
Definition at line 164 of file statement_list_language.cpp.
|
overridevirtual |
Implements languaget.
Definition at line 144 of file statement_list_language.cpp.
|
overridevirtual |
Formats the given expression in a language-specific way.
expr | the expression to format |
code | the formatted expression |
ns | a namespace |
Reimplemented from languaget.
Definition at line 94 of file statement_list_language.cpp.
|
overridevirtual |
Formats the given type in a language-specific way.
type | the type to format |
code | the formatted type |
ns | a namespace |
Reimplemented from languaget.
Definition at line 103 of file statement_list_language.cpp.
|
overridevirtual |
|
overridevirtual |
Implements languaget.
Definition at line 159 of file statement_list_language.cpp.
|
overridevirtual |
Reimplemented from languaget.
Definition at line 139 of file statement_list_language.cpp.
|
overridevirtual |
Implements languaget.
Definition at line 154 of file statement_list_language.cpp.
|
overridevirtual |
Parses input given by instream
and saves this result to this instance's parse tree.
instream | Input to parse. |
path | Path of the input. |
message_handler | Message handler. |
Implements languaget.
Definition at line 58 of file statement_list_language.cpp.
|
overridevirtual |
Sets language specific options.
options | Options that shall apply during the parse and typecheck process. |
message_handler | Message handler. |
Reimplemented from languaget.
Definition at line 24 of file statement_list_language.cpp.
|
overridevirtual |
Prints the parse tree to the given output stream.
Implements languaget.
Definition at line 76 of file statement_list_language.cpp.
|
overridevirtual |
Parses the given string into an expression.
code | the string to parse |
module | prefix to be used for identifiers |
expr | the parsed expression |
ns | a namespace |
message_handler | Message handler. |
Implements languaget.
Definition at line 120 of file statement_list_language.cpp.
|
overridevirtual |
Encodes the given type in a language-specific way.
type | the type to encode |
name | the encoded type |
ns | a namespace |
Reimplemented from languaget.
Definition at line 112 of file statement_list_language.cpp.
|
overridevirtual |
Implements languaget.
Definition at line 86 of file statement_list_language.cpp.
|
overridevirtual |
Converts the current parse tree into a symbol table.
[out] | symbol_table | Object that shall be filled by this function. If the symbol table is not empty when calling this function, its contents are merged with the new entries. |
module | Name of the file that has been parsed. | |
message_handler | Message handler. | |
keep_file_local | Set to true if local variables of this module should be included in the table. |
Reimplemented from languaget.
Definition at line 38 of file statement_list_language.cpp.
|
private |
Definition at line 128 of file statement_list_language.h.
|
private |
Definition at line 127 of file statement_list_language.h.
|
private |
Definition at line 126 of file statement_list_language.h.