• In the meantime, let's explore Scala's third option for building parsers: parser combinators, built entirely from the functional side of Scala.

    同时,我们来探索Scala构建解析器的第3个选项:解析器组合子(parsercombinators),它完全是从Scala的函数性方面构建的。

    youdao

  • To change it to produce instances of our case class AST hierarchy (Expr objects), the return type of the combinators has to be changed to be Parser[Expr].

    要将它更改为生成case类AST层次结构的实例(Expr对象),组合子的返回类型必须更改为Parser[Expr]。

    youdao

  • If you make that change on its own, it will fail to compile; the three combinators know how to take in Strings but not how to produce Expr objects from what's parsed.

    如果让它自行更改,编译将会失败;这三个组合子知道如何获取String,但不知道如何根据解析的内容生成Expr对象。

    youdao

  • Parsers "combine" to provide higher and higher levels of abstraction over the concept of parsing (hence the name "parser combinators"; elements which combine together to provide parsing behavior).

    “组合”解析器可以提供解析概念的越来越高级的抽象(因此称为“解析器组合子”;组合在一起的元素提供解析行为)。

    youdao

  • Parsers "combine" to provide higher and higher levels of abstraction over the concept of parsing (hence the name "parser combinators"; elements which combine together to provide parsing behavior).

    “组合”解析器可以提供解析概念的越来越高级的抽象(因此称为“解析器组合子”;组合在一起的元素提供解析行为)。

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定