CBMC
statement_list_parser.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Statement List Language Parser
4 
5 Author: Matthias Weiss, matthias.weiss@diffblue.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_STATEMENT_LIST_STATEMENT_LIST_PARSER_H
13 #define CPROVER_STATEMENT_LIST_STATEMENT_LIST_PARSER_H
14 
15 #include <util/parser.h>
16 
18 
22 
35 {
36 public:
40  bool parse() override;
41 
45  void add_function_block(const exprt &block);
46 
50  void add_function(const exprt &function);
51 
55  void add_tag_list(const exprt &tag_list);
56 
59  void print_tree(std::ostream &out) const;
60 
64 
67  void clear() override;
68 
69 private:
72 };
73 
76 
81 int yystatement_listerror(const std::string &error);
82 
86 
87 #endif // CPROVER_STATEMENT_LIST_STATEMENT_LIST_PARSER_H
statement_list_parsert::add_function_block
void add_function_block(const exprt &block)
Adds a function block to the parse tree by converting the block expression tree.
Definition: statement_list_parser.cpp:301
statement_list_parsert::print_tree
void print_tree(std::ostream &out) const
Prints the parse tree of this instance to the given output stream.
Definition: statement_list_parser.cpp:352
statement_list_parsert::parse
bool parse() override
Starts the parsing process and saves the result inside of this instance's parse tree.
Definition: statement_list_parser.cpp:335
exprt
Base class for all expressions.
Definition: expr.h:55
statement_list_parsert::add_tag_list
void add_tag_list(const exprt &tag_list)
Adds a tag list to the parse tree by converting the tag_list expression tree.
Definition: statement_list_parser.cpp:40
statement_list_parsert::swap_tree
void swap_tree(statement_list_parse_treet &other)
Swaps the contents of the parse tree of this instance with other.
Definition: statement_list_parser.cpp:357
statement_list_parsert::parse_tree
statement_list_parse_treet parse_tree
Tree that is being filled by the parsing process.
Definition: statement_list_parser.h:71
yystatement_listerror
int yystatement_listerror(const std::string &error)
Forwards any errors that are encountered during the parse process.
Definition: statement_list_parser.cpp:340
statement_list_scanner_init
void statement_list_scanner_init()
Defined in scanner.l.
statement_list_parse_tree.h
yystatement_listparse
int yystatement_listparse()
Defined in statement_list_y.tab.cpp.
parsert
Definition: parser.h:23
statement_list_parsert::clear
void clear() override
Removes all functions and function blocks from the parse tree and clears the internal state of the pa...
Definition: statement_list_parser.cpp:346
statement_list_parse_treet
Intermediate representation of a parsed Statement List file before converting it into a goto program.
Definition: statement_list_parse_tree.h:20
parser.h
statement_list_parsert::add_function
void add_function(const exprt &function)
Adds a function to the parse tree by converting the function expression tree.
Definition: statement_list_parser.cpp:318
statement_list_parser
statement_list_parsert statement_list_parser
Instance of the parser, used by other modules.
Definition: statement_list_parser.cpp:21
statement_list_parsert
Responsible for starting the parse process and to translate the result into a statement_list_parse_tr...
Definition: statement_list_parser.h:34