marf.nlp.Parsing
Class LexicalError

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.LexicalError
All Implemented Interfaces:
java.io.Serializable

public class LexicalError
extends CompilerError

This class denotes LexicalError type. $Id: LexicalError.java,v 1.8 2005/06/16 19:58:57 mokhov Exp $

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

Field Summary
static int BAD_REAL
          Badly formed real number.
static int CUSTOM
          Custom error message as alterbntive to 'unknown'.
static int EXTRA_CLOSING_COMMENT
          Mismatched comment.
protected  Token FaultingToken
          Token information at which Lexer encountered the error.
static int INVALID_CHAR
          Character encountered is not part of the C+-'s alphabet.
static int INVALID_NUMBER_FORMAT
          Invalid number format.
static int LEADING_ZEROS
          Leading zeros are not allowed in numbers.
static int TRAILING_ZEROS
          Not meaningful trailing zeros aren't allowed.
static int UNEXPECTED_EOF
          Unxepected EOF and no ending comment.
 
Fields inherited from class marf.nlp.Parsing.CompilerError
CurrentErrorCode, CurrentErrorString, LineNo, OK
 
Fields inherited from class marf.util.MARFException
strMessage
 
Constructor Summary
LexicalError(int piErrorCode, Token poFaultingToken)
          Constructor 1.
LexicalError(Token poFaultingToken, java.lang.String pstrCustomErrorMessage)
          Constructor 2 - An Alternative to Unknown Error.
 
Method Summary
static java.lang.String getMARFSourceCodeRevision()
          Retrieves class' revision.
 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

INVALID_CHAR

public static final int INVALID_CHAR
Character encountered is not part of the C+-'s alphabet.

Since:
October 2, 2001
See Also:
Constant Field Values

LEADING_ZEROS

public static final int LEADING_ZEROS
Leading zeros are not allowed in numbers.

Since:
October 2, 2001
See Also:
Constant Field Values

TRAILING_ZEROS

public static final int TRAILING_ZEROS
Not meaningful trailing zeros aren't allowed.

Since:
October 2, 2001
See Also:
Constant Field Values

BAD_REAL

public static final int BAD_REAL
Badly formed real number.

Since:
October 2, 2001
See Also:
Constant Field Values

INVALID_NUMBER_FORMAT

public static final int INVALID_NUMBER_FORMAT
Invalid number format.

Since:
October 2, 2001
See Also:
Constant Field Values

UNEXPECTED_EOF

public static final int UNEXPECTED_EOF
Unxepected EOF and no ending comment.

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

EXTRA_CLOSING_COMMENT

public static final int EXTRA_CLOSING_COMMENT
Mismatched comment.

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

CUSTOM

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

Since:
October 2, 2001
See Also:
Constant Field Values

FaultingToken

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

Since:
October 2, 2001
Constructor Detail

LexicalError

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


LexicalError

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

Method Detail

serialize

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


getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string