jess
Class ParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by jess.JessException
              extended by jess.ParseException
All Implemented Interfaces:
java.io.Serializable

public class ParseException
extends JessException

An error during parsing. These are used extensively in the JessDE editor.

(C) 2013 Sandia Corporation

See Also:
Serialized Form

Field Summary
static int ADVICE
          First advice
static int ADVICE_COULD_BE_FUNCTION
          This could be a nil list, but it also could be a function call.
static int INVALID_DECLARAND
          A semantic error has been detected in the input.
static int SEMANTIC_ERROR
          A semantic error has been detected in the input.
static int SYNTAX_ERROR
          A syntax error has been detected in the input.
static int WARNING_IMPLIED_DEFTEMPLATE
          An implied ordered deftemplate has been created.
static int WARNING_NO_SUCH_SLOT
          An invalid slot name was seen in a pattern.
static int WARNING_REDEFINITION
          A rule or query is being redefined, perhaps inadvertently
static int WARNING_UNDEFINED_DEFGLOBAL
          An undefined defglobal was referenced.
static int WARNING_UNDEFINED_DEFQUERY
          An undefined defquery is invoked.
static int WARNING_UNDEFINED_FUNCTION
          An unknown funtion name was seen.
 
Fields inherited from class jess.JessException
CLASS_NOT_FOUND, GENERAL_ERROR, NO_ERROR
 
Method Summary
 java.lang.String[] getAlternatives()
          Returns an array of valid tokens that would have been accepted in place of the error token.
 Named getConstruct()
          If the parser is parsing a construct when the error occurred, then the partially-built construct will be returned; otherwise, this method returns null.
 JessToken getErrorToken()
          Returns the token at which the error was detected
 java.lang.String getFilename()
          Returns the name of the file in which the error was detected, if known; otherwise returns null.
 boolean isAdvice()
           
 
Methods inherited from class jess.JessException
getCause, getContext, getData, getDetail, getErrorCode, getExecutionContext, getLineNumber, getProgramText, getRoutine, setErrorCode, setFilename, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SYNTAX_ERROR

public static final int SYNTAX_ERROR
A syntax error has been detected in the input.

See Also:
Constant Field Values

SEMANTIC_ERROR

public static final int SEMANTIC_ERROR
A semantic error has been detected in the input.

See Also:
Constant Field Values

INVALID_DECLARAND

public static final int INVALID_DECLARAND
A semantic error has been detected in the input.

See Also:
Constant Field Values

WARNING_IMPLIED_DEFTEMPLATE

public static final int WARNING_IMPLIED_DEFTEMPLATE
An implied ordered deftemplate has been created.

See Also:
Constant Field Values

WARNING_UNDEFINED_FUNCTION

public static final int WARNING_UNDEFINED_FUNCTION
An unknown funtion name was seen.

See Also:
Constant Field Values

WARNING_UNDEFINED_DEFGLOBAL

public static final int WARNING_UNDEFINED_DEFGLOBAL
An undefined defglobal was referenced.

See Also:
Constant Field Values

WARNING_UNDEFINED_DEFQUERY

public static final int WARNING_UNDEFINED_DEFQUERY
An undefined defquery is invoked.

See Also:
Constant Field Values

WARNING_NO_SUCH_SLOT

public static final int WARNING_NO_SUCH_SLOT
An invalid slot name was seen in a pattern.

See Also:
Constant Field Values

WARNING_REDEFINITION

public static final int WARNING_REDEFINITION
A rule or query is being redefined, perhaps inadvertently

See Also:
Constant Field Values

ADVICE

public static final int ADVICE
First advice

See Also:
Constant Field Values

ADVICE_COULD_BE_FUNCTION

public static final int ADVICE_COULD_BE_FUNCTION
This could be a nil list, but it also could be a function call.

See Also:
Constant Field Values
Method Detail

getErrorToken

public JessToken getErrorToken()
Returns the token at which the error was detected

Returns:
the token

getAlternatives

public java.lang.String[] getAlternatives()
Returns an array of valid tokens that would have been accepted in place of the error token.

Returns:
an array of strings
See Also:
getErrorToken()

getConstruct

public Named getConstruct()
If the parser is parsing a construct when the error occurred, then the partially-built construct will be returned; otherwise, this method returns null.

Returns:
a partially built construct, or null

isAdvice

public boolean isAdvice()

getFilename

public java.lang.String getFilename()
Returns the name of the file in which the error was detected, if known; otherwise returns null.

Overrides:
getFilename in class JessException
Returns:
a filename, or null

© 2013 Sandia Corporation