dpwtr666638 2015-02-17 06:10
浏览 61
已采纳

为什么在定义更多类型时会导致yacc解析器崩溃?

I wrote a test.y file with more types. After certain limit, when I compiled the file with command, go tool yacc test

It panics,"Index out of range in yacc.go:891" When I looked at the file https://golang.org/src/cmd/yacc/yacc.go, I saw this comment in defining the constants "the following are adjustable according to memory size" Is there a reason why they have limited the number of type definition to 63(NTYPES = 63) in line 74(in the file mentioned in the link above)

  • 写回答

2条回答 默认 最新

  • dongpu9852 2015-02-19 17:51
    关注

    "It panics,"Index out of range in yacc.go:891" "

    I got into the same problem because I needed more types (non-term and term types) and what I did to remedy my situation was to change several values.

    Please see my GitHub page documenting my change.

    Or simply click on the URL below.

    https://github.com/MagnusTiberius/go/commit/d4eeb860229867c76d99e67d69bdbd7cc729ce2c

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗