通常在语法的一开始或结束时通常会消耗空格吗?
我已经开始使用FPARSEC。这是我第一次使用“语法”编写解析器,而不仅仅是编码行为。我试图弄清楚通常如何处理空白:在任何给定语法的开始时?在最后?取决于?为什么?
例如,符号识别器
是否应该在“ ... ABC ...”中解析领先的白色空间,还是应该被以前的语法消费?
I've started using FParsec. This is the first time i'm writing a parser using "grammar" and not just coding the behaviour. I'm trying to figure out how white space should generally be treated: At start of any given syntax? At the end? Depends? And why?
For example, should SymbolIdentifier
parse the leading white space in "... abc ...", or should it be consumed by a previous syntax?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论