简体   繁体   English

Scala解析器组合器-快到了!

[英]Scala parser combinator - almost there!

After I solved the initial problem , I now believe I have parsed everything, and it now seems to be choking on the very end of the input: 解决了最初的问题之后 ,我现在相信我已经解析了所有内容,并且现在似乎在输入的最后使您感到窒息:

Failure: [9.1] failure: string matching regex `\z' expected but `' found

^

Um, it is finding no characters at the very end. 嗯,到最后都找不到字符。 Should I append my own "\\z" EOF somehow? 我应该以某种方式附加自己的“ \\ z” EOF吗?

You didn't really solve your original problem. 您并没有真正解决您原来的问题。 See my answer, where I cover this problem. 查看我的答案,我将在其中解决这个问题。 Basically, there's a \\r\\n at the end of the file -- which is taken to be a separator -- so it expects another repetition. 基本上,文件末尾有一个\\r\\n被当作​​一个分隔符-因此它期望另一个重复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM