FsLex 和 FsYacc 的疯狂错误
I am trying to compile this project:
But I get a bunch of non-sense errors. They got text I am familiar with, but in the position there is nothing like that (like unexpected ')' at an empty row).
Help me, please!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在我看来,错误消息(至少是我检查的第一条)位于正确的行上(但该行上的列无效)。我认为这是一个设计限制,但我不能 100% 确定。
无论如何,文件
LispParser.fsy
的第 25 行对我来说看起来很可疑:大括号中的表达式是
List($1, -1, Null) ]
并且有一个结束符方括号]
但不是左方括号。所以,我认为支架可能不应该在那里。我没有尝试过,但我认为剩下的错误只是这个问题的结果。It seems to me that the error message (at least the first one I checked) is on a correct line (but an invalid column on that line). I'd think that this is a by-design limitation, but I'm not 100% sure.
Anyway, line 25 of the file
LispParser.fsy
looks suspicious to me:The expression in curly braces is
List($1, -1, Null) ]
and there is a closing square bracket]
but not an opening one. So, I think the bracket probably shouldn't be there. I didn't try it, but I think that the remaining errors are just consequence of this issue.很多小错误,我根本不明白它是如何工作的。
托马斯发现的括号是错误之一(拼写错误),但整个概念是错误的。
现在解决了。
Many small mistake, I didn't understand at all how it works.
The bracket Tomas found was one of the mistakes (a typo), but the whole concept was wrong.
Solved now.