|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
TopLevelClass.ParseException
Describes a error of a text.
The program generated by ¬<><∪∪ throws this exception only if the parsed text has some syntactical error. But, the users of ¬<><∪∪ may throw this exception if it has some semantic error.
Nested Class Summary | |
static class |
TopLevelClass.ParseException.AmbiguousGrammarError
Indicates the source of the notavaCC, which generates this Java program, has ambiguity. |
Constructor Summary | |
TopLevelClass.ParseException(String msg,
String sourceName,
int index,
int line,
int column)
Constructs an exception. |
|
TopLevelClass.ParseException(String msg,
TopLevelClass.Token position)
Constructs an exception. |
Method Summary | |
int |
getColumn()
Returns the column number where the exception is occured. |
String |
getGCCStylePositionString()
Returns the GNU-Compiler-Collection-style string that describes the position of the error. |
int |
getIndex()
Returns the index number where the exception is occured. |
int |
getLine()
Returns the line number where the exception is occured. |
String |
getSourceName()
Returns the source name where the exception is occured. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TopLevelClass.ParseException(String msg,
String sourceName,
int index,
int line,
int column)
msg
- a message to describes the error.sourceName
- the source name where the exception is occured, or null if not supported.index
- the index number where the exception is occured, or -1 if not supported.line
- the line number where the exception is occured, or -1 if not supported.column
- the column number where the exception is occured, or -1 if not supported.public TopLevelClass.ParseException(String msg, TopLevelClass.Token position)
msg
- a message to describes the error.position
- a token that describes the position of the error.Method Detail |
public final String getSourceName() throws UnsupportedOperationException
UnsupportedOperationException
- if the method is not suported.public final int getIndex() throws UnsupportedOperationException
UnsupportedOperationException
- if the method is not suported.public final int getLine() throws UnsupportedOperationException
UnsupportedOperationException
- if the method is not suported.public final int getColumn() throws UnsupportedOperationException
UnsupportedOperationException
- if the method is not suported.public final String getGCCStylePositionString() throws UnsupportedOperationException
This method throws an UnsupportedOperationException if getSourceName()
is not supported.
Otherwise, it returns getSourceName()
if getLine()
is not supported.
Otherwise, it returns getSourceName() + ":" + getLine()
if getColumn()
is not supported.
Otherwise, it returns getSourceName() + ":" + getLine() + ":" + getColumn()
.
UnsupportedOperationException
- getSourceName() was not suppoted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |