simpleparse.error
index
s:\sp\simpleparse\error.py

 
Modules
            
string
 
Classes
            
exceptions.SyntaxError(exceptions.StandardError)
ParserSyntaxError
 
class ParserSyntaxError(exceptions.SyntaxError)
      Sub-class of SyntaxError for use by SimpleParse parsers
 
Every instance will have the following attributes:
        buffer -- pointer to the source buffer
        position -- integer position in buffer where error occured or -1
        production -- the production which failed
        expected -- string (currently taken from grammar) describing
                what production/element token failed to match
the following will be calculated in order to display
human-friendly error messages:
        line -- ~ text line-number or -1
        lineChar -- ~ character on line where parsing failed or -1
 
  
Method resolution order:
ParserSyntaxError
exceptions.SyntaxError
exceptions.StandardError
exceptions.Exception

Methods defined here:
__str__(self)
Create a string representation of the error
getLineCoordinate(self)
Get (line number, line character) for the error
messageFormat(self, template=None)
Create a default message for this syntax error

Data and non-method functions defined here:
DEFAULTTEMPLATE = 'Failed parsing production "%(production)s" @pos ...\nExpected syntax: %(expected)s\nGot text: %(text)s'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
__doc__ = 'Sub-class of SyntaxError for use by SimpleParse ... character on line where parsing failed or -1\n\t\n\t'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
__module__ = 'simpleparse.error'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
buffer = ''
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
expected = ''
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
line = -1
int(x[, base]) -> integer
 
Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.
position = -1
int(x[, base]) -> integer
 
Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.
production = ''
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

Methods inherited from exceptions.SyntaxError:
__init__(...)

Data and non-method functions inherited from exceptions.SyntaxError:
filename = None
lineno = None
msg = ''
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
offset = None
print_file_and_line = None
text = None

Methods inherited from exceptions.Exception:
__getitem__(...)
 
Data
             __file__ = r'S:\sp\simpleparse\error.pyc'
__name__ = 'simpleparse.error'