diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-01-25 17:06:35 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-01-25 17:06:35 (GMT) |
commit | ece0461582b622bc4051f1acb8f47f674bd8b232 (patch) | |
tree | 14f900078b039a89a7cea6581ff9c5e194669a5c /vhdlparser/TokenMgrError.cc | |
parent | 5fc28e95e929bc66bbbe1415acdf5c20bd24d1b4 (diff) | |
parent | c90cc1fa96f29f23dbde92d8445171a7848f0358 (diff) | |
download | Doxygen-ece0461582b622bc4051f1acb8f47f674bd8b232.zip Doxygen-ece0461582b622bc4051f1acb8f47f674bd8b232.tar.gz Doxygen-ece0461582b622bc4051f1acb8f47f674bd8b232.tar.bz2 |
Merge branch 'maddox11-fixed-parser-bugs-javacc705'
Diffstat (limited to 'vhdlparser/TokenMgrError.cc')
-rw-r--r-- | vhdlparser/TokenMgrError.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/vhdlparser/TokenMgrError.cc b/vhdlparser/TokenMgrError.cc index 74908f0..3560805 100644 --- a/vhdlparser/TokenMgrError.cc +++ b/vhdlparser/TokenMgrError.cc @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.cc Version 6.2 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.cc Version 7.0 */ /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ #include "TokenMgrError.h" @@ -14,17 +14,17 @@ namespace parser { * errorLine : line number when the error occurred * errorColumn : column number when the error occurred * errorAfter : prefix that was seen before this error occurred - * curJAVACC_CHAR_TYPE : the offending character + * curJJChar : the offending character * Note: You can customize the lexical error message by modifying this method. */ - JAVACC_STRING_TYPE TokenMgrError::LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar) { + JJString TokenMgrError::LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar) { #if 0 - JAVACC_STRING_TYPE s; - stringstream<JAVACC_STRING_TYPE> ss; + JJString s; + stringstream<JJString> ss; ss << "Lexical error at line " << errorLine << " column " << errorColumn << ". Encountered: " << curChar << "(" << (int)curChar << ") after : \"" << errorAfter.c_str() << "\""; - return (JAVACC_STRING_TYPE)ss.rdbuf()->str(); + return (JJString)ss.rdbuf()->str(); #endif return EMPTY; } @@ -38,7 +38,7 @@ namespace parser { * * from this method for such cases in the release version of your parser. */ - JAVACC_STRING_TYPE TokenMgrError::getMessage() { + JJString TokenMgrError::getMessage() { return message; } @@ -51,12 +51,12 @@ namespace parser { } /** Constructor with message and reason. */ - TokenMgrError::TokenMgrError(JAVACC_STRING_TYPE message, int reason) { + TokenMgrError::TokenMgrError(const JJString& message, int reason) { errorCode = reason; } /** Full Constructor. */ - TokenMgrError::TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, int reason) { + TokenMgrError::TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, int reason) { message = LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar); errorCode = reason; } @@ -64,7 +64,7 @@ namespace parser { // i < 16 - guaranteed char hexChar(int i) { if (i < 10) { - return i + '0'; + return i - '0'; } return 'a' + (i - 10); } @@ -73,10 +73,10 @@ char hexChar(int i) { * Replaces unprintable characters by their escaped (or unicode escaped) * equivalents in the given string */ -JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str) { - JAVACC_SIMPLE_STRING retval; +JJSimpleString addUnicodeEscapes(const JJString& str) { + JJSimpleString retval; for (size_t i = 0; i < str.size(); i++) { - JAVACC_CHAR_TYPE ch = str[i]; + JJChar ch = str[i]; switch (ch) { case '\b': @@ -115,4 +115,4 @@ JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str) { } } -/* JavaCC - OriginalChecksum=72f292bc267bd0602e63291bf864f942 (do not edit this line) */ +/* JavaCC - OriginalChecksum=ed66d80b94c73435ce2644e44f7b4d49 (do not edit this line) */ |