Compiler errors (…)*构造中的JAVACC错误选择冲突
我第一次使用javacc 我不断地发现这个错误:Compiler errors (…)*构造中的JAVACC错误选择冲突,compiler-errors,bnf,javacc,Compiler Errors,Bnf,Javacc,我第一次使用javacc 我不断地发现这个错误: Warning: Choice conflict in (...)* construct at line 35, column 43. Expansion nested within construct and expansion following construct have common prefixes, one of which is: <SPACE> Consider using a look
Warning: Choice conflict in (...)* construct at line 35, column 43.
Expansion nested within construct and expansion following construct
have common prefixes, one of which is: <SPACE>
Consider using a lookahead of 2 or more for nested expansion.
错误出现在(
在这行中,有人能帮我正确理解吗?你有(我想)
假设l_zero
启动时的剩余输入为
<SOMETOKEN> <SPACE> ...
或
void l_zero():{}{
(向前看())*
}
你有(我想)
假设l_zero
启动时的剩余输入为
<SOMETOKEN> <SPACE> ...
或
void l_zero():{}{
(向前看())*
}
void someNonterminal() : {} {
l_zero() <SPACE> <YETANOTHERTOKEN>
}
<SOMETOKEN> <SPACE> ...
void l_zero() : {} {
<TOKEN1> ( LOOKAHEAD(2) <SPACE> <TOKEN1> )*
}
void l_zero() : {} {
<TOKEN1> ( LOOKAHEAD(<SPACE> <TOKEN1>) <SPACE> <TOKEN1> )*
}