覆盖“内部快乐错误” - 根本不快乐
我正在使用 Happy 生成解析器。
我发现,当我给它匹配比顶层更低级别的部分语法的标记时(例如给它自己一个表达式,这不是语句的一部分),我得到一个“Internal Happy”错误”而不是解析错误。
有没有办法覆盖 notHappyAtAll
以便我可以打印比“Internal Happy Error”更好的错误消息?显然,除了更改自动生成的解析器文件之外,因为每次更新语法时我都必须这样做。
I am using Happy to generate a parser.
I have found that when I give it tokens which match part of the grammar at a lower level than the top level (such as giving it an expression on it's own, that isn't part of a statement), I get an "Internal Happy Error" rather than a parse error.
Is there a way to override notHappyAtAll
so that I can print a better error message than "Internal Happy Error"? Obviously other than changing the auto-generated parser file as I'd have to do it every time I updated the grammar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题似乎已在 Happy 1.18.7 中得到修复。
This problem appears to have been fixed in Happy 1.18.7.