cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
assembler_parser.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module:
4
5
Author: 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
17
class
assembler_parsert
;
18
int
yyassemblererror
(
assembler_parsert
&,
void
*,
const
std::string &error);
19
20
class
assembler_parsert
:
public
parsert
21
{
22
public
:
23
typedef
std::vector<irept>
instructiont
;
24
std::list<instructiont>
instructions
;
25
26
void
add_token
(
const
irept
&irep)
27
{
28
if
(
instructions
.empty())
29
new_instruction
();
30
31
instructions
.back().push_back(irep);
32
}
33
34
void
new_instruction
()
35
{
36
instructions
.push_back(
instructiont
());
37
}
38
39
explicit
assembler_parsert
(
message_handlert
&message_handler)
40
:
parsert
(message_handler)
41
{
42
}
43
44
bool
parse
()
override
;
45
};
46
47
#endif
// CPROVER_ASSEMBLER_ASSEMBLER_PARSER_H
yyassemblererror
int yyassemblererror(assembler_parsert &, void *, const std::string &error)
Definition
assembler_parser.cpp:13
assembler_parsert
Definition
assembler_parser.h:21
assembler_parsert::instructions
std::list< instructiont > instructions
Definition
assembler_parser.h:24
assembler_parsert::instructiont
std::vector< irept > instructiont
Definition
assembler_parser.h:23
assembler_parsert::parse
bool parse() override
Definition
assembler_parser.cpp:26
assembler_parsert::new_instruction
void new_instruction()
Definition
assembler_parser.h:34
assembler_parsert::assembler_parsert
assembler_parsert(message_handlert &message_handler)
Definition
assembler_parser.h:39
assembler_parsert::add_token
void add_token(const irept &irep)
Definition
assembler_parser.h:26
irept
There are a large number of kinds of tree structured or tree-like data in CPROVER.
Definition
irep.h:364
message_handlert
Definition
message.h:27
parsert::parsert
parsert(message_handlert &message_handler)
Definition
parser.h:33
parser.h
Parser utilities.
assembler
assembler_parser.h
Generated by
1.17.0