com.judoscript.parser
Class ParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.judoscript.parser.ParseException
All Implemented Interfaces:
java.io.Serializable

public class ParseException
extends java.lang.Exception

This is based on the JavaCC-generated ParseExcetion name-sake class. We add the 'annotation' and display a more contextual error message.

See Also:
Serialized Form

Field Summary
 java.lang.String annotation
           
 int col
           
 java.lang.String currentFilename
           
 Token currentToken
           
 int[][] expectedTokenSequences
           
 int row
           
 boolean specialConstructor
           
static java.lang.String SYNTAX_HELP_FILE
           
 java.lang.String[] tokenImage
           
 
Constructor Summary
ParseException()
           
ParseException(java.lang.String message)
           
ParseException(java.lang.String message, int row, int col)
           
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, java.lang.String[] tokenImageVal)
           
 
Method Summary
 ParseException addAnnotation(java.lang.String s)
           
 ParseException addSyntaxHelp(java.lang.String name)
           
 ParseException addSyntaxHelp(java.lang.String name, java.lang.String desc)
           
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SYNTAX_HELP_FILE

public static final java.lang.String SYNTAX_HELP_FILE
See Also:
Constant Field Values

specialConstructor

public boolean specialConstructor

tokenImage

public java.lang.String[] tokenImage

annotation

public java.lang.String annotation

expectedTokenSequences

public int[][] expectedTokenSequences

currentToken

public Token currentToken

currentFilename

public java.lang.String currentFilename

row

public int row

col

public int col
Constructor Detail

ParseException

public ParseException(Token currentTokenVal,
                      int[][] expectedTokenSequencesVal,
                      java.lang.String[] tokenImageVal)

ParseException

public ParseException()

ParseException

public ParseException(java.lang.String message)

ParseException

public ParseException(java.lang.String message,
                      int row,
                      int col)
Method Detail

addAnnotation

public ParseException addAnnotation(java.lang.String s)

addSyntaxHelp

public ParseException addSyntaxHelp(java.lang.String name)

addSyntaxHelp

public ParseException addSyntaxHelp(java.lang.String name,
                                    java.lang.String desc)

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable