SCalc
Public Member Functions | Protected Attributes
SCalc::SyntaxError Class Reference

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>

Inheritance diagram for SCalc::SyntaxError:
Inheritance graph
[legend]
Collaboration diagram for SCalc::SyntaxError:
Collaboration graph
[legend]

List of all members.

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.

Protected Attributes

std::string original
std::string message
int start
int end

Detailed Description

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()).


The documentation for this class was generated from the following file: