@@ -20,22 +20,22 @@ public class TokenMgrError extends Error
2020 /**
2121 * Lexical error occurred.
2222 */
23- static final int LEXICAL_ERROR = 0 ;
23+ public static final int LEXICAL_ERROR = 0 ;
2424
2525 /**
2626 * An attempt was made to create a second instance of a static token manager.
2727 */
28- static final int STATIC_LEXER_ERROR = 1 ;
28+ public static final int STATIC_LEXER_ERROR = 1 ;
2929
3030 /**
3131 * Tried to change to an invalid lexical state.
3232 */
33- static final int INVALID_LEXICAL_STATE = 2 ;
33+ public static final int INVALID_LEXICAL_STATE = 2 ;
3434
3535 /**
3636 * Detected (and bailed out of) an infinite loop in the token manager.
3737 */
38- static final int LOOP_DETECTED = 3 ;
38+ public static final int LOOP_DETECTED = 3 ;
3939
4040 /**
4141 * Indicates the reason why the exception is thrown. It will have
@@ -53,8 +53,6 @@ protected static final String addEscapes(String str) {
5353 for (int i = 0 ; i < str .length (); i ++) {
5454 switch (str .charAt (i ))
5555 {
56- case 0 :
57- continue ;
5856 case '\b' :
5957 retval .append ("\\ b" );
6058 continue ;
@@ -104,11 +102,12 @@ protected static final String addEscapes(String str) {
104102 * curchar : the offending character
105103 * Note: You can customize the lexical error message by modifying this method.
106104 */
107- protected static String LexicalError (boolean EOFSeen , int lexState , int errorLine , int errorColumn , String errorAfter , char curChar ) {
105+ protected static String LexicalErr (boolean EOFSeen , int lexState , int errorLine , int errorColumn , String errorAfter , int curChar ) {
106+ char curChar1 = (char )curChar ;
108107 return ("Lexical error at line " +
109108 errorLine + ", column " +
110109 errorColumn + ". Encountered: " +
111- (EOFSeen ? "<EOF> " : ("\" " + addEscapes (String .valueOf (curChar )) + "\" " ) + " (" + (int )curChar + "), " ) +
110+ (EOFSeen ? "<EOF> " : ("\" " + addEscapes (String .valueOf (curChar1 )) + "\" " ) + " (" + (int )curChar + "), " ) +
112111 "after : \" " + addEscapes (errorAfter ) + "\" " );
113112 }
114113
@@ -140,8 +139,8 @@ public TokenMgrError(String message, int reason) {
140139 }
141140
142141 /** Full Constructor. */
143- public TokenMgrError (boolean EOFSeen , int lexState , int errorLine , int errorColumn , String errorAfter , char curChar , int reason ) {
144- this (LexicalError (EOFSeen , lexState , errorLine , errorColumn , errorAfter , curChar ), reason );
142+ public TokenMgrError (boolean EOFSeen , int lexState , int errorLine , int errorColumn , String errorAfter , int curChar , int reason ) {
143+ this (LexicalErr (EOFSeen , lexState , errorLine , errorColumn , errorAfter , curChar ), reason );
145144 }
146145}
147- /* JavaCC - OriginalChecksum=a0e8995d1ac9564645c0d60018a41934 (do not edit this line) */
146+ /* JavaCC - OriginalChecksum=8aa730919ae2540f8651db5bc248e427 (do not edit this line) */
0 commit comments