OK, we're clearly not finished (there's parsing work yet to be done), but the basic parser semantics are in place, requiring only that we extend the parser production elements to produce AST elements.
显然,我们还没有结束(解析工作还没有完成),但是现在有了基本的解析器语义,接下来只需通过扩展解析器产生元素来生成ast元素。
InfoQ: How did you make your technical choice like using parse tree for parsing and building AST Ruby?
InfoQ:你如何做技术上的选择,比如解析使用parsetree,以及构建ASTRuby ?
To clarify names and bindings, I debugged the CDT's parsing of the Hello World program and provided the AST breakdown shown in Figure 3.
为澄清名称及绑定,我调试了CDT对Hello World程序的解析并在图3中提供了AST的分解。
I'm clearly not finished yet; there's parsing work yet to be done, but the calculator AST is in pretty good shape.
显然我还没有说完;还有分析的工作要做,但是计算器ast已经成形。
Of course, you could just deal with things as Strings and Lists and ignore the AST part of the world, picking apart the returned Strings and Lists and re-parsing them into AST elements.
当然,您可以只与String和List打交道,而忽略ast部分,拆开返回的String和List,并重新将它们解析成ast元素。
Of course, you could just deal with things as Strings and Lists and ignore the AST part of the world, picking apart the returned Strings and Lists and re-parsing them into AST elements.
当然,您可以只与String和List打交道,而忽略ast部分,拆开返回的String和List,并重新将它们解析成ast元素。
应用推荐