Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从 NetBSD 源代码树编译简单的expr.y文件,当我使用 bison (GNU Bison) 2.4.2 时,出现以下错误:
expr.y:75.14: syntax error, unexpected = expr.y:82.29: syntax error, unexpected =
文件有什么问题,应该如何修复?
有(或曾经有)一些 yacc 版本,它们接受=之前的{,例如
=
{
exp: expr = { ... | expr SPEC_OR expr = {
只需将所有发生的事件(在该文件中不超过十个)更改为:
exp: expr { ... | expr SPEC_OR expr {