satyr
0.43
Toggle main menu visibility
Loading...
Searching...
No Matches
include
location.h
Go to the documentation of this file.
1
/*
2
location.h
3
4
Copyright (C) 2010 Red Hat, Inc.
5
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License along
17
with this program; if not, write to the Free Software Foundation, Inc.,
18
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
*/
20
#ifndef SATYR_LOCATION_H
21
#define SATYR_LOCATION_H
22
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
#include <stdbool.h>
33
42
struct
sr_location
43
{
45
int
line
;
47
int
column
;
52
const
char
*
message
;
53
};
54
59
void
60
sr_location_init
(
struct
sr_location
*location);
61
84
int
85
sr_location_cmp
(
struct
sr_location
*location1,
86
struct
sr_location
*location2,
87
bool
compare_messages);
88
93
char
*
94
sr_location_to_string
(
struct
sr_location
*location);
95
111
void
112
sr_location_add
(
struct
sr_location
*location,
113
int
add_line,
114
int
add_column);
115
128
void
129
sr_location_add_ext
(
int
*line,
130
int
*column,
131
int
add_line,
132
int
add_column);
133
139
void
140
sr_location_eat_char
(
struct
sr_location
*location,
141
char
c);
142
152
void
153
sr_location_eat_char_ext
(
int
*line,
154
int
*column,
155
char
c);
156
157
#ifdef __cplusplus
158
}
159
#endif
160
161
#endif
sr_location_eat_char_ext
void sr_location_eat_char_ext(int *line, int *column, char c)
sr_location_add
void sr_location_add(struct sr_location *location, int add_line, int add_column)
sr_location_to_string
char * sr_location_to_string(struct sr_location *location)
sr_location_add_ext
void sr_location_add_ext(int *line, int *column, int add_line, int add_column)
sr_location_eat_char
void sr_location_eat_char(struct sr_location *location, char c)
sr_location_init
void sr_location_init(struct sr_location *location)
sr_location_cmp
int sr_location_cmp(struct sr_location *location1, struct sr_location *location2, bool compare_messages)
sr_location
A location of a parser in the input stream.
Definition
location.h:43
sr_location::message
const char * message
Definition
location.h:52
sr_location::line
int line
Definition
location.h:45
sr_location::column
int column
Definition
location.h:47
Generated by
1.17.0