satyr 0.43
Loading...
Searching...
No Matches
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
29extern "C" {
30#endif
31
32#include <stdbool.h>
33
43{
45 int line;
47 int column;
52 const char *message;
53};
54
59void
60sr_location_init(struct sr_location *location);
61
84int
85sr_location_cmp(struct sr_location *location1,
86 struct sr_location *location2,
87 bool compare_messages);
88
93char *
95
111void
113 int add_line,
114 int add_column);
115
128void
130 int *column,
131 int add_line,
132 int add_column);
133
139void
141 char c);
142
152void
154 int *column,
155 char c);
156
157#ifdef __cplusplus
158}
159#endif
160
161#endif
void sr_location_eat_char_ext(int *line, int *column, char c)
void sr_location_add(struct sr_location *location, int add_line, int add_column)
char * sr_location_to_string(struct sr_location *location)
void sr_location_add_ext(int *line, int *column, int add_line, int add_column)
void sr_location_eat_char(struct sr_location *location, char c)
void sr_location_init(struct sr_location *location)
int sr_location_cmp(struct sr_location *location1, struct sr_location *location2, bool compare_messages)
A location of a parser in the input stream.
Definition location.h:43
const char * message
Definition location.h:52