|
Packit Service |
50c9f2 |
/* Generated By:JavaCC: Do not edit this line. TokenMgrError.h Version 6.0 */
|
|
Packit Service |
50c9f2 |
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
|
|
Packit Service |
50c9f2 |
#ifndef _TOKENMGRERROR_H
|
|
Packit Service |
50c9f2 |
#define _TOKENMGRERROR_H
|
|
Packit Service |
50c9f2 |
#include "JavaCC.h"
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
namespace vhdl {
|
|
Packit Service |
50c9f2 |
namespace parser {
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
enum LexerErrors {
|
|
Packit Service |
50c9f2 |
/**
|
|
Packit Service |
50c9f2 |
* Lexical error occurred.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
LEXICAL_ERROR = 0,
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/**
|
|
Packit Service |
50c9f2 |
* An attempt was made to create a second instance of a token manager.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
STATIC_LEXER_ERROR = 1,
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/**
|
|
Packit Service |
50c9f2 |
* Tried to change to an invalid lexical state.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
INVALID_LEXICAL_STATE = 2,
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/**
|
|
Packit Service |
50c9f2 |
* Detected (and bailed out of) an infinite loop in the token manager.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
LOOP_DETECTED = 3,
|
|
Packit Service |
50c9f2 |
};
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
class TokenMgrError
|
|
Packit Service |
50c9f2 |
{
|
|
Packit Service |
50c9f2 |
public:
|
|
Packit Service |
50c9f2 |
/*
|
|
Packit Service |
50c9f2 |
* Ordinals for various reasons why an Error of this type can be thrown.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/**
|
|
Packit Service |
50c9f2 |
* Indicates the reason why the exception is thrown. It will have
|
|
Packit Service |
50c9f2 |
* one of the above 4 values.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
int errorCode;
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/**
|
|
Packit Service |
50c9f2 |
* Returns a detailed message for the Error when it is thrown by the
|
|
Packit Service |
50c9f2 |
* token manager to indicate a lexical error.
|
|
Packit Service |
50c9f2 |
* Parameters :
|
|
Packit Service |
50c9f2 |
* EOFSeen : indicates if EOF caused the lexical error
|
|
Packit Service |
50c9f2 |
* curLexState : lexical state in which this error occurred
|
|
Packit Service |
50c9f2 |
* errorLine : line number when the error occurred
|
|
Packit Service |
50c9f2 |
* errorColumn : column number when the error occurred
|
|
Packit Service |
50c9f2 |
* errorAfter : prefix that was seen before this error occurred
|
|
Packit Service |
50c9f2 |
* curchar : the offending character
|
|
Packit Service |
50c9f2 |
* Note: You can customize the lexical error message by modifying this method.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
JAVACC_STRING_TYPE LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar);
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
private: JAVACC_STRING_TYPE message;
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/**
|
|
Packit Service |
50c9f2 |
* You can also modify the body of this method to customize your error messages.
|
|
Packit Service |
50c9f2 |
* For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
|
|
Packit Service |
50c9f2 |
* of end-users concern, so you can return something like :
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
* "Internal Error : Please file a bug report .... "
|
|
Packit Service |
50c9f2 |
*
|
|
Packit Service |
50c9f2 |
* from this method for such cases in the release version of your parser.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
JAVACC_STRING_TYPE getMessage() ;
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/*
|
|
Packit Service |
50c9f2 |
* Constructors of various flavors follow.
|
|
Packit Service |
50c9f2 |
*/
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/** No arg constructor. */
|
|
Packit Service |
50c9f2 |
public: TokenMgrError() ;
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/** Constructor with message and reason. */
|
|
Packit Service |
50c9f2 |
public: TokenMgrError(JAVACC_STRING_TYPE message, int reason) ;
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
/** Full Constructor. */
|
|
Packit Service |
50c9f2 |
public: TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, int reason) ;
|
|
Packit Service |
50c9f2 |
};
|
|
Packit Service |
50c9f2 |
|
|
Packit Service |
50c9f2 |
}
|
|
Packit Service |
50c9f2 |
}
|
|
Packit Service |
50c9f2 |
#endif
|
|
Packit Service |
50c9f2 |
/* JavaCC - OriginalChecksum=c7d825cb4d037b031ae43569d383f738 (do not edit this line) */
|