cprover
Loading...
Searching...
No Matches
assembler_parser.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module:
4
5Author: Daniel Kroening, kroening@kroening.com
6
7\*******************************************************************/
8
9
10#ifndef CPROVER_ASSEMBLER_ASSEMBLER_PARSER_H
11#define CPROVER_ASSEMBLER_ASSEMBLER_PARSER_H
12
13#include <util/parser.h>
14
15#include <list>
16
18int yyassemblererror(const std::string &error);
20
22{
23public:
24 typedef std::vector<irept> instructiont;
25 std::list<instructiont> instructions;
26
27 void add_token(const irept &irep)
28 {
29 if(instructions.empty())
31
32 instructions.back().push_back(irep);
33 }
34
36 {
37 instructions.push_back(instructiont());
38 }
39
41 {
42 }
43
44 virtual bool parse()
45 {
47 return false;
48 }
49
50 virtual void clear()
51 {
53 instructions.clear();
54 // assembler_scanner_init();
55 }
56};
57
59
60#endif // CPROVER_ASSEMBLER_ASSEMBLER_PARSER_H
int yyassemblerlex()
void assembler_scanner_init()
int yyassemblererror(const std::string &error)
assembler_parsert assembler_parser
virtual bool parse()
std::list< instructiont > instructions
std::vector< irept > instructiont
virtual void clear()
void add_token(const irept &irep)
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition irep.h:372
virtual void clear()
Definition parser.h:32
Parser utilities.