syntax.hh
/*
syntax.hh, copyright (c) 2006 by Vincent Fourmond:
The class for describing syntax errors
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details (in the COPYING file).
*/
namespace SCalc {
class SyntaxError : public ParserResult {
protected:
std::string original;
std::string message;
int start;
int end;
public:
virtual int is_syntax_error() { return 1;};
SyntaxError(Session * s, const char * str,
const char *error, int st, int en);
std::string original_string() { return original;};
std::string error_message() { return message;};
int start_pos() { return start;};
int end_pos() { return end;};
virtual std::string pretty_print();
};
};