SCalc
|
A syntax error This class represents a syntax error. You can get several informations about this error, such as the original_string(), the error_message(), the exact location of the error in the string (start_pos() and end_pos()). More...
#include <syntax.hh>
Public Member Functions | |
virtual int | is_syntax_error () |
Yes, this is a syntax error. | |
SyntaxError (Session *s, const char *str, const char *error, int st, int en) | |
std::string | original_string () |
The original string on which the error occured. | |
std::string | error_message () |
The error message. | |
int | start_pos () |
The starting position. | |
int | end_pos () |
The end position. | |
virtual std::string | pretty_print () |
Pretty prints the error message Returns a std::string containing a nice display of the error message, with a series of ^^^^ showing where the error occurred. This function assumes that all characters have the same display size. | |
![]() | |
ParserResult (Session *s) | |
Constructors/desctructors: | |
Session * | session () |
The SCalc::Session object used. More... | |
virtual int | can_delete () |
virtual int | is_expression () |
Is it a SCalc::Expression ? More... | |
Expression * | to_expression () |
Converts to SCalc::Expression. More... | |
SyntaxError * | to_syntax_error () |
Converts to SCalc::SyntaxError. More... | |
virtual int | is_func_def () |
Is it a SCalc::FuncDef ? More... | |
FuncDef * | to_func_def () |
Converts to SCalc::FuncDef. More... | |
Protected Attributes | |
std::string | original |
std::string | message |
int | start |
int | end |
A syntax error This class represents a syntax error. You can get several informations about this error, such as the original_string(), the error_message(), the exact location of the error in the string (start_pos() and end_pos()).