举例来说,如果您简单地对所有源文件执行语法分析程序,那么您就可以确保源代码遵守预定义的编码标准。
For example, if you simply parse all of the source files for a program, you can ensure that the source code adheres to a predefined coding standard.
正如我在注释中指出的,清单1中的第一块代码(第1 - 5行)处理对输入流的语法分析,以构建文档表示。
As I indicate in the comments, the first block of code (lines 1-5) in Listing 1 handles parsing an input stream to build a document representation.
不幸的是,大部分本科编译课程只教授扫描、语法分析、中间表示,和某种代码生成的基础。
Unfortunately, most undergraduate compiler courses only teach the basics of scanning, parsing, intermediate representations, and some code generation.
集成开发环境 (IDE)工具可以提供大量有用功能,例如代码完成、语法突出显示、语法分析、重构和调试。
The integrated development environment (IDE) tool can provide many helpful features, such as code completion, syntax highlighting, syntax analysis, refactoring, and debugging.
尽管代码生成器可以理解一点儿目标语言的知识,但是它们通常都不是完整的语法分析器,不重新编写一个完整的编译器是无法全面考虑目标语言的。
While code generators understand a little bit about the target language, they are usually not full parsers and cannot take the target language into account without rewriting a complete compiler.
现在,如果使用“清单3”中的方法,那么SAX代码甚至不必进行重新编译就能运行,并根据需要使用不同的语法分析器实现。
Now, if you follow the method in Listing 3, your SAX code can hum along without even having to be recompiled, using different parser implementations as needed.
在某些应用中,XML文档是仅由语法分析器建立的,而从不会由应用程序级代码建立,这是不相关的。
For certain USES where XML documents are built only by a parser, and never by application-level code, this is irrelevant.
这两个库都基于IBM 提供的代码并分别控制XML语法分析和XSL变换。
These two libraries are based on code donated by IBM and govern XML parsing and XSL transforms, respectively.
清单2在清单1中所示的源代码中添加一个类,并在语法分析器中注册该错误处理程序。
Listing 2 adds a class to the source shown in Listing 1 and registers that error handler with the parser.
有一个缺点是:在更改语法分析器时,仍必须对代码做一些更改。
The one drawback is that, when changing the parser, you still have to make some changes to your code.
清单3中的CrimsonDOM示例代码使用了用于语法分析的JAXP接口。
The Crimson DOM example code in Listing 3 USES the JAXP interface for parsing.
因为可以使用类似语法分析树(ParseTree)的通用方法来对Ruby代码进行分析并获得抽象语法树(Abstract Syntax Tree),所以在Ruby历史上的一定时期内,纯ruby语法分析器的缺失被忽视了。
A lack of a pure Ruby parser has been negligible for some time in Ruby's history, since getting the Abstract Syntax Tree (AST) of some Ruby code was possible with utilities such as ParseTree.
为了避免这个问题,在Rubinius的虚拟器中,ruby _ parser的Ruby源代码会被编译为Rubinius字节码。当Rubinius启动时,它通过读取ruby _ parser的字节码文件——这些文件不需要进行语法分析——来运行一个ruby语法分析器。
To avoid the chicken-and-egg question "How can a ruby VM work if it's parser is ruby code?" : during the build process of the Rubinius VM, the ruby source code of ruby_parser can be compiled into.
这一部分包括词法分析,语法分析,语义分析和生成目标代码四个部分。
This part contains accidence analyzing, phrasing analyzing, semantic analyzing and creating aim code.
译码过程完成词法分析、语法分析和语义分析,并在此基础上生成中间代码。
The coding process accomplishes accidence analysis, syntax analysis, and semantic analysis and transitional codes are generated on it.
作战指令的自动化生成主要涉及到汉语分词技术、语法分析和代码生成。
The automatic generation of military instruction is mainly concentrated with Chinese lexical analysis, grammar analysis, and instruction coding.
将编译技术引入NC代码分析处理过程中,把NC代码编译过程分为词法分析、语法分析和代码转换三个阶段。
Having introduced the compile technology into the process of NC code analysis, the process of NC code compile is divided into three stages: Lexical analysis, Syntactic analysis and NC code Conversion.
本系统针对源程序进行词法分析、语法分析、出错检测,并最终生成自定义的目标代码。
The system carrys through lexical analysis, grammar analysis, fluffing check and finally creating user-defined aim code.
一个脚本引擎通常包括的组件有:符号表、词法分析器、语法分析器、语义检查器、中间代码生成器、代码优化器、代码生成器、虚拟机。
The script engine has some components, include symbol table, lexical analyzer, parser, semantic checker, intermediate code generator, optimizer, code generator, virtual machine.
一个脚本引擎通常包括的组件有:符号表、词法分析器、语法分析器、语义检查器、中间代码生成器、代码优化器、代码生成器、虚拟机。
The script engine has some components, include symbol table, lexical analyzer, parser, semantic checker, intermediate code generator, optimizer, code generator, virtual machine.
应用推荐