释义 |
Ast. 基本例句 医散光 But, the first steps we are planning to take is to build an interpreter that is based off the new IR instruction operations rather than AST nodes. 我们计划第一步要构建一个基于新 IR指令操作而非 AST节点的解释器。 infoq The analysis API eliminates most of the challenges associated with visiting AST nodes by providing a common visitor class and abstracting the query mechanism. 分析 API通过提供一个公用的访问者类和抽象查询机制,消除了和访问 AST节点相关联的大部分挑战。 ibm The AST is a tree representation of the parsed source code, created by the compiler, similar to the DOM tree model of an XML file. AST代表已解析源代码的树,它由编译器创建,与 XML文件的 DOM树模型类似。 ibm The AST is a tree representation of the source code that contains everything from variable declarations to function definitions and method invocations. AST是源代码的树形表示,它包含了从变量声明到功能定义和方法调用的全部内容。 ibm Again traversing the AST, this phase may directly interpret the program or our output code in C or assembly. 再次遍历 AST,这个阶段可能用 C或汇编直接解释程序或输出代码。 ibm Comment nodes do not show in the AST Tree because they are not parented. AST树中没有显示注释节点,因为它们没有父子关系。 ibm Documenting your annotation handlers will benefit maintainers of the AST transformations, while documenting your annotations will benefit their users. 文档注释处理程序将有益于 AST转换的维护者,而文档注释将有益于其用户。 ibm Doing syntactic macros is very inconvenient when you have an AST that looks like these languages. 当你有一个像以上那些语言的 AST时,你会发现要想实现语法宏是多么的不方便。 infoq First, you have to consider whether a change to the AST needs to be made. 首先,您必须考虑是否需要更改 AST。 ibm For now, all you need is a basic understanding of the AST tree structure, and the Eclipse Java IDE Help can provide that. 现在,您所需要的就是对 AST树结构有一个基本的理解, Eclipse Java IDE Help就可以提供这一点。 ibm For that, you would turn to something quite familiar to compiler aficionados: the JDT's Abstract Syntax Tree AST framework. 因为您会转而使用一些对编译器迷而言十分熟悉的工具: JDT的抽象语法树 Abstract Syntax Tree, AST框架。 ibm I'm clearly not finished yet; there's parsing work yet to be done, but the calculator AST is in pretty good shape. 显然我还没有说完;还有分析的工作要做,但是计算器 AST已经成形。 ibm In IDEA and Eclipse, your code looks like a text view, but the development environment is actually editing the Abstract Syntax Tree AST. 在 IDEA和 Eclipse中,您的代码看上去像一个文本视图,但是开发环境实际上正在编辑 Abstract Syntax Tree AST。 ibm It will flag errors only if there is something in the source file that will affect the AST Tree integrity. 只有当源文件中有一些代码影响到 AST树的完整性时才会标记错误。 ibm Note that even though the AST APIs are different, the implementation of these methods is very similar. 请注意,即使对于不同 AST API,这些方法的实现也是非常相似的。 ibm Now, I show how the CDT parser generates the AST and how you can traverse it with your own code. 接下来介绍 CDT解析器如何生成 AST以及如何用您自己的代码对其进行遍历。 ibm Now comes the other half of building a DSL: We need to build a segment of code that can take some kind of textual input and turn it into an AST. 现在是构建 DSL的另一半工作:我们需要构建一段代码,它可以接收某种文本输入并将其转换成一个 AST。 ibm One necessity for making code tools is the AST, to analyze source. 制造代码工具一个必须的东西是 AST,用来分析源码。 infoq SIP tooling is also provided in the AST to help you more easily build SIP applications. AST中提供的 SIP工具可以帮助您更轻松地构建 SIP应用程序。 ibm Take some time to peruse this documentation, because you will eventually need to write AST code for some of your more advanced rules. 请花一些时间研读这一文档,因为您最终将会为您的高级规则编写 AST代码。 ibm The following sections contain recommendations, from project setup to testing, that you may find useful when creating your own AST transformations. 以下部分包含了一些建议,从项目设置到测试,这些在创建自己的 AST转换时可能会很有用。 ibm The first item on our plate is to define this AST for the calculator language. 您要做的第一件事是为计算器语言定义该 AST。 ibm The rule that we previously examined is about as simple as a rule can get. It queries for only a single type of node in the AST tree and blindly reports all results remaining after filter. 我们前面所介绍的规则是最简单的一种了,它只查询 AST树中一种类型的节点,并且盲目地报告所有结果。 ibm This line visits the AST tree, starting at the compilation unitthe top- most node, and queries for a list of all method declarations. 这一行访问 AST树,起步于编辑单元最顶层的节点,并且查询所有的方法声明。 ibm To explain this and other interesting features, I need to describe what the indexer does with the parser's AST and how it interacts with the PDOM. 为解释这个以及其他有趣的特性,我需要描述一下索引器使用解析器的 AST将如何工作以及它如何同 PDOM进行交互。 ibm While ParseTree output doesn't seem to be planned, it's entirely possible to translate the ANTLR generated AST into the ParseTree format. 而分析树输出看起来还没有计划,很有可能把 ANTLR产生的 AST转化成分析树格式。 infoq You can go even further and create an' AST' for your language and display it in the navigation bar and outline views. 你甚至可以为你的语言创建一个‘ AST’,并在导航条与大纲视图上显示它。 infoq |