查询”q=手机”, 提示Error “Lexical error at: 1:5. Encountered: ter: EOF.”;
查询 ‘q=”手机”’, 不提示错误.
查询 “q = 空调”, 不提示错误.
查询 ‘q=”光源”, 提示Error “Lexical error at: 1:3. Encountered: ter: “光. Lexical error at: 1:7. Encountered: ” after: EOF.”.
其他类似错误:
Expecting ; at: 7:35 but got (
Expecting } at: 7:35 but got (
Expecting } at: 7:35 but got (
Expecting EOF at: 7:35 but got (
'''JavaCC产生的C++代码中,将JAVACC_CHAR_TYPE定义为char, 在文件JavaParserTokenManager.cc中部分分支覆盖。'''
'''(1)JavaCC.h'''
#ifndef JAVACC_CHAR_TYPE
#define JAVACC_CHAR_TYPE char
#endif
'''(2)JavaParserTokenManager.cc'''
...
} while(i != startsAt);
}
else if (**curChar < 128**)
{
unsigned long long l = 1ULL << (curChar & 077);
(void)l;
do
{
...
'''定义JAVACC_CHAR_TYPE为unsigned char'''
'''JavaCC.h'''
#ifndef JAVACC_CHAR_TYPE
#define JAVACC_CHAR_TYPE unsigned char
#endif
JavaCC github issue ;c++ generated parser doesn’t support international characters(https://github.com/javacc/javacc/issues/22)
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/zhufenglonglove/article/details/71403218
内容来源于网络,如有侵权,请联系作者删除!