marf.nlp.Parsing
Class SemanticError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by marf.util.MARFException
              extended by marf.nlp.Parsing.CompilerError
                  extended by marf.nlp.Parsing.SemanticError
All Implemented Interfaces:
java.io.Serializable

public class SemanticError
extends CompilerError

Class SemanticError. Represents ann instance of a sematic error in the compilation process. $Id: SemanticError.java,v 1.7 2005/06/16 19:58:57 mokhov Exp $

Since:
0.3.0
Version:
$Revision: 1.7 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
static int ASSIGN_TYPE_MISMATCH
          Type mismatch in the assignment.
static int CUSTOM
          Custom error message as alternative to 'unknown'.
static int EXPR_TYPE_MISMATCH
          Type mismatch in an expression.
protected  Token FaultingToken
          Token information at which Lexer encountered the error.
static int MULT_DEF_SYM
          Symbol defined multiple times.
static int PARAM_TYPE_MISMATCH
          Mismatch of types of parameters in a function call.
static int UNDEF_SYM
          Undefined Symbol.
 
Fields inherited from class marf.nlp.Parsing.CompilerError
CurrentErrorCode, CurrentErrorString, LineNo, OK
 
Fields inherited from class marf.util.MARFException
strMessage
 
Constructor Summary
SemanticError(int piErrorCode, Token poFaultingToken)
          Constructor 1.
SemanticError(Token poFaultingToken, java.lang.String pstrCustomErrorMessage)
          Constructor 2 - An Alterantive to Unknown Error.
 
Method Summary
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 boolean serialize(int piOperation, java.io.FileWriter poFileWriter)
          Serialization routine.
 
Methods inherited from class marf.nlp.Parsing.CompilerError
getCurrentErrorCode, getCurrentErrorString, getLineNo
 
Methods inherited from class marf.util.MARFException
getMessage, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

UNDEF_SYM

public static final int UNDEF_SYM
Undefined Symbol.

Since:
December 19, 2001
See Also:
Constant Field Values

MULT_DEF_SYM

public static final int MULT_DEF_SYM
Symbol defined multiple times.

Since:
December 19, 2001
See Also:
Constant Field Values

EXPR_TYPE_MISMATCH

public static final int EXPR_TYPE_MISMATCH
Type mismatch in an expression.

Since:
December 19, 2001
See Also:
Constant Field Values

ASSIGN_TYPE_MISMATCH

public static final int ASSIGN_TYPE_MISMATCH
Type mismatch in the assignment.

Since:
December 19, 2001
See Also:
Constant Field Values

PARAM_TYPE_MISMATCH

public static final int PARAM_TYPE_MISMATCH
Mismatch of types of parameters in a function call.

Since:
December 19, 2001
See Also:
Constant Field Values

CUSTOM

public static final int CUSTOM
Custom error message as alternative to 'unknown'.

Since:
December 19, 2001
See Also:
Constant Field Values

FaultingToken

protected Token FaultingToken
Token information at which Lexer encountered the error.

Since:
October 2, 2001
Constructor Detail

SemanticError

public SemanticError(int piErrorCode,
                     Token poFaultingToken)
Constructor 1.


SemanticError

public SemanticError(Token poFaultingToken,
                     java.lang.String pstrCustomErrorMessage)
Constructor 2 - An Alterantive to Unknown Error.

Method Detail

serialize

public boolean serialize(int piOperation,
                         java.io.FileWriter poFileWriter)
Serialization routine.


getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string