Top Fields Constructors Methods
org.python.antlr

public Class ParseException

extends RuntimeException
Class Inheritance
Imports
org.antlr.runtime.IntStream, .RecognitionException, .Token, org.python.core.Py, .PyObject

Field Summary

Modifier and TypeField and Description
public boolean
public int
c

public int
public boolean
public int
public transient IntStream
public int
public Object
public Token
private PyObject

Constructor Summary

AccessConstructor and Description
public
public
ParseException(String message, int lin, int charPos)

public
public
ParseException(String
text to include.
message
,
PythonTree
not null, root of the PythonTree provoking the error.
n
,
boolean
true if we cannot recover with more input.
definite
)

Construct a ParseException specifying whether to treat as a final decision.

public
ParseException(String
text to include.
message
,
PythonTree
not null, root of the PythonTree provoking the error.
n
)

Construct a ParseException specifying message and tree.

public

Method Summary

Modifier and TypeMethod and Description
public PyObject
public void

Field Detail

approximateLineInfoback to summary
public boolean approximateLineInfo
cback to summary
public int c
charPositionInLineback to summary
public int charPositionInLine
definiteback to summary
public boolean definite
indexback to summary
public int index
inputback to summary
public transient IntStream input
lineback to summary
public int line
nodeback to summary
public Object node
tokenback to summary
public Token token
typeback to summary
private PyObject type

Constructor Detail

ParseExceptionback to summary
public ParseException()
ParseExceptionback to summary
public ParseException(String message, int lin, int charPos)
ParseExceptionback to summary
public ParseException(String message)
ParseExceptionback to summary
public ParseException(String message, PythonTree n, boolean definite)

Construct a ParseException specifying whether to treat as a final decision. When we use this constructor in the REPL, and definite=true, Jython will take it that the problem is a definite syntax or semantic error, not that we just haven't finished a multi-line construct that will be valid eventually.

Parameters
message:String

text to include.

n:PythonTree

not null, root of the PythonTree provoking the error.

definite:boolean

true if we cannot recover with more input.

ParseExceptionback to summary
public ParseException(String message, PythonTree n)

Construct a ParseException specifying message and tree. When we use this constructor in the REPL, Jython will assume the problem is an incomplete input (as when you wrap a line inside parentheses or are inside another nested construct), and a "... " prompt is likely to be produced.

Parameters
message:String

text to include.

n:PythonTree

not null, root of the PythonTree provoking the error.

ParseExceptionback to summary
public ParseException(String message, RecognitionException r)

Method Detail

getTypeback to summary
public PyObject getType()
setTypeback to summary
public void setType(PyObject t)