Statement List Language Parser.
More...
#include "statement_list_parser.h"
#include "converters/statement_list_types.h"
#include "statement_list_parse_tree.h"
#include "statement_list_parse_tree_io.h"
#include <algorithm>
#include <cmath>
#include <iostream>
#include <iterator>
#include <util/string_constant.h>
Go to the source code of this file.
Statement List Language Parser.
Definition in file statement_list_parser.cpp.
◆ fill_temp_vars()
Adds all temp variable declarations (variable declarations which can't have a default value) to the given list.
- Parameters
-
parse_tree_list | The list to fill with all declarations. |
temp_vars | The root expression of a temp variable list. |
Definition at line 142 of file statement_list_parser.cpp.
◆ fill_vars_with_default_values()
Adds all variable declarations (which can have a default value) to the given list.
- Parameters
-
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 110 of file statement_list_parser.cpp.
◆ find_instructions()
Adds all valid instructions to the given network.
- Parameters
-
network | The network to which the instructions belong. |
instructions | The root expression of a valid instruction list. |
Definition at line 256 of file statement_list_parser.cpp.
◆ find_name()
Searches for the name of the TIA module inside of its root expression.
- Parameters
-
root | Expression that includes the element's name as a direct operand. |
- Returns
- The name of the function element.
Definition at line 32 of file statement_list_parser.cpp.
◆ find_network_instructions()
static exprt find_network_instructions |
( |
const exprt & |
network | ) |
|
|
static |
Searches for the instruction list of a network inside of its root expression.
- Parameters
-
network | Expression that includes the network's instructions as a direct operand. |
- Returns
- The instruction list expression of the network.
Definition at line 243 of file statement_list_parser.cpp.
◆ find_network_list()
static exprt find_network_list |
( |
const exprt & |
root | ) |
|
|
static |
Searches for the network list of the TIA element inside of its root expression.
- Parameters
-
root | Expression that includes the element's network list as a direct operand. |
- Returns
- The network list of the element.
Definition at line 214 of file statement_list_parser.cpp.
◆ find_network_title()
static std::string find_network_title |
( |
const exprt & |
network | ) |
|
|
static |
Searches for the title of a network inside of its root expression.
- Parameters
-
network | Expression that includes the network's title as a direct operand. |
- Returns
- The title of the network.
Definition at line 228 of file statement_list_parser.cpp.
◆ find_networks()
Adds all valid networks and their instructions to the given function element.
- Parameters
-
module | The TIA element to which the networks belong. |
network_list | The root expression of a valid network list. |
Definition at line 278 of file statement_list_parser.cpp.
◆ find_return_value()
static typet find_return_value |
( |
const exprt & |
root | ) |
|
|
static |
Searches for the return type of a function inside of its root expression.
- Parameters
-
root | Expression that includes the function's return type as a direct operand. |
- Returns
- The return type of the function.
Definition at line 75 of file statement_list_parser.cpp.
◆ find_variable_list()
static exprt find_variable_list |
( |
const exprt & |
root | ) |
|
|
static |
Searches for the variable list of the TIA module inside of its root expression.
- Parameters
-
root | Expression that includes the element's variable list as a direct operand. |
- Returns
- The variable list of the element.
Definition at line 95 of file statement_list_parser.cpp.
◆ find_variables() [1/2]
Adds all valid variable declarations to the given function block.
- Parameters
-
block | The TIA element to which the variables belong. |
var_decls | The root expression of a valid variable list. |
Definition at line 188 of file statement_list_parser.cpp.
◆ find_variables() [2/2]
Adds all valid variable declarations to the given function.
- Parameters
-
function | The TIA element to which the variables belong. |
var_decls | The root expression of a valid variable list. |
Definition at line 166 of file statement_list_parser.cpp.
◆ find_version()
static std::string find_version |
( |
const exprt & |
root | ) |
|
|
static |
Searches for the version of the TIA module inside of its root expression.
- Parameters
-
root | Expression that includes the element's version as a direct operand. |
- Returns
- The version of the element.
Definition at line 57 of file statement_list_parser.cpp.
◆ yystatement_listerror()
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.
- Parameters
-
- Returns
- Always 0.
Definition at line 331 of file statement_list_parser.cpp.
◆ statement_list_parser
◆ yystatement_listtext
char* yystatement_listtext |
|
extern |