CBMC
|
#include "statement_list_parser.h"
#include "statement_list_parse_tree.h"
#include "statement_list_parse_tree_io.h"
#include <algorithm>
#include <iostream>
#include <iterator>
#include <util/string_constant.h>
Go to the source code of this file.
Functions | |
static irep_idt | find_name (const exprt &root) |
Searches for the name of the TIA module inside of its root expression. More... | |
static std::string | find_version (const exprt &root) |
Searches for the version of the TIA module inside of its root expression. More... | |
static typet | find_return_value (const exprt &root) |
Searches for the return type of a function inside of its root expression. More... | |
static exprt | find_variable_list (const exprt &root) |
Searches for the variable list of the TIA module inside of its root expression. More... | |
static void | fill_vars_with_default_values (statement_list_parse_treet::var_declarationst &parse_tree_list, const exprt &var_list) |
Adds all variable declarations (which can have a default value) to the given list. More... | |
static void | fill_temp_vars (statement_list_parse_treet::var_declarationst &parse_tree_list, const exprt &temp_vars) |
Adds all temp variable declarations (variable declarations which can't have a default value) to the given list. More... | |
static void | find_variables (statement_list_parse_treet::functiont &function, const exprt &var_decls) |
Adds all valid variable declarations to the given function. More... | |
static void | find_variables (statement_list_parse_treet::function_blockt &block, const exprt &var_decls) |
Adds all valid variable declarations to the given function block. More... | |
static exprt | find_network_list (const exprt &root) |
Searches for the network list of the TIA element inside of its root expression. More... | |
static std::string | find_network_title (const exprt &network) |
Searches for the title of a network inside of its root expression. More... | |
static exprt | find_network_instructions (const exprt &network) |
Searches for the instruction list of a network inside of its root expression. More... | |
static void | find_instructions (statement_list_parse_treet::networkt &network, const exprt &instructions) |
Adds all valid instructions to the given network. More... | |
static void | find_networks (statement_list_parse_treet::tia_modulet &module, const exprt &network_list) |
Adds all valid networks and their instructions to the given function element. More... | |
int | yystatement_listerror (const std::string &error) |
Forwards any errors that are encountered during the parse process. More... | |
Variables | |
statement_list_parsert | statement_list_parser |
Instance of the parser, used by other modules. More... | |
char * | yystatement_listtext |
Statement List Language Parser
Definition in file statement_list_parser.cpp.
|
static |
Adds all temp variable declarations (variable declarations which can't have a default value) to the given list.
parse_tree_list | The list to fill with all declarations. |
temp_vars | The root expression of a temp variable list. |
Definition at line 140 of file statement_list_parser.cpp.
|
static |
Adds all variable declarations (which can have a default value) to the given list.
parse_tree_list | The list to fill with all declarations. |
var_list | The root expression of a variable list with optional default values. |
Definition at line 108 of file statement_list_parser.cpp.
|
static |
Adds all valid instructions to the given network.
network | The network to which the instructions belong. |
instructions | The root expression of a valid instruction list. |
Definition at line 254 of file statement_list_parser.cpp.
Searches for the name of the TIA module inside of its root expression.
root | Expression that includes the element's name as a direct operand. |
Definition at line 30 of file statement_list_parser.cpp.
Searches for the instruction list of a network inside of its root expression.
network | Expression that includes the network's instructions as a direct operand. |
Definition at line 241 of file statement_list_parser.cpp.
Searches for the network list of the TIA element inside of its root expression.
root | Expression that includes the element's network list as a direct operand. |
Definition at line 212 of file statement_list_parser.cpp.
|
static |
Searches for the title of a network inside of its root expression.
network | Expression that includes the network's title as a direct operand. |
Definition at line 226 of file statement_list_parser.cpp.
|
static |
Adds all valid networks and their instructions to the given function element.
module | The TIA element to which the networks belong. |
network_list | The root expression of a valid network list. |
Definition at line 287 of file statement_list_parser.cpp.
Searches for the return type of a function inside of its root expression.
root | Expression that includes the function's return type as a direct operand. |
Definition at line 73 of file statement_list_parser.cpp.
Searches for the variable list of the TIA module inside of its root expression.
root | Expression that includes the element's variable list as a direct operand. |
Definition at line 93 of file statement_list_parser.cpp.
|
static |
Adds all valid variable declarations to the given function block.
block | The TIA element to which the variables belong. |
var_decls | The root expression of a valid variable list. |
Definition at line 186 of file statement_list_parser.cpp.
|
static |
Adds all valid variable declarations to the given function.
function | The TIA element to which the variables belong. |
var_decls | The root expression of a valid variable list. |
Definition at line 164 of file statement_list_parser.cpp.
|
static |
Searches for the version of the TIA module inside of its root expression.
root | Expression that includes the element's version as a direct operand. |
Definition at line 55 of file statement_list_parser.cpp.
int yystatement_listerror | ( | const std::string & | error | ) |
Forwards any errors that are encountered during the parse process.
This function gets called by the generated files of flex and bison.
error | Error message. |
Definition at line 340 of file statement_list_parser.cpp.
statement_list_parsert statement_list_parser |
Instance of the parser, used by other modules.
Definition at line 21 of file statement_list_parser.cpp.
char* yystatement_listtext |