SCalc
Main Page
Related Pages
Classes
Files
File List
lib
syntax.hh
1
/*
2
syntax.hh, copyright (c) 2006 by Vincent Fourmond:
3
The class for describing syntax errors
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details (in the COPYING file).
14
15
*/
16
17
namespace
SCalc {
18
26
class
SyntaxError
:
public
ParserResult
{
27
protected
:
28
std::string original;
29
std::string message;
30
int
start;
31
int
end;
32
public
:
33
35
virtual
int
is_syntax_error
() {
return
1;};
36
37
SyntaxError
(
Session
* s,
const
char
* str,
38
const
char
*error,
int
st,
int
en);
39
41
std::string
original_string
() {
return
original;};
43
std::string
error_message
() {
return
message;};
45
int
start_pos
() {
return
start;};
47
int
end_pos
() {
return
end;};
48
56
virtual
std::string
pretty_print
();
57
};
58
};
Generated by
1.8.3.1