javacc
-
In total , JavaCC generates the following seven Java files .
JavaCC总共生成了以下七个Java文件。
-
This article describes one such parser-generator tool called JavaCC .
本文就描述了这样的一种解析器-生成器工具,称为JavaCC。
-
So , what needs to be added to the JavaCC source to produce this ?
因此,需要向JavaCC源代码添加什么来生成该查询呢?
-
The JavaCC syntax has a procedural look , with productions looking very much like method calls .
JavaCC语法看上去象一个过程,而结果看上去非常象进行方法调用。
-
JavaCC also creates six other auxilliary files that are used by the parser .
JavaCC还创建了其它六个由解析器使用的辅助文件。
-
Taking JavaCC for a test drive
将JavaCC当作测试驱动器
-
JavaCC , like YACC , is designed to speed the process of developing parser logic for languages .
JavaCC与YACC一样,是为加快语言解析器逻辑的开发过程而设计的。
-
With very few lines of JavaCC code , you have produced a very effective end-user query language .
通过非常少的几行JavaCC代码,您就生成了非常有效的终端用户查询语言。
-
The second set of braces encloses the production rule written in a way that JavaCC understands .
第二组花括号包含以JavaCC理解的方式所写的产生式规则。
-
You will have to make some adjustments to the top of the properties file to point to your JavaCC installation .
您必须将上方的属性文件调整为指向JavaCC安装。
-
JavaCC has merely listed them in an array and provided integer constants to reference into that array .
JavaCC只不过将它们记录在数组中并提供整型常数来引用该数组。
-
When Javacc is run against a.jj file , productions are translated into methods .
当对.jj文件运行Javacc时,产生式将被转换为方法。
-
To compile the Java code generated by JavaCC , no outside JAR files or directories are required .
要编译由JavaCC生成的Java代码,无需任何外部JAR文件或目录。
-
To do this , add a method called getSQL () to the top part of the JavaCC file .
为此,要在JavaCC文件的最上部分添加一个名为getSQL()的方法。
-
The JavaCC compilation process
JavaCC编译过程
-
With this article , we have demonstrated that JavaCC can be used to provide a powerful , yet simple query language for end users of a database system .
通过本文,我们说明了JavaCC可用于为数据库系统的终端用户提供一种功能强大却很简单的查询语言。
-
Before writing a parser yourself , be sure to look in JavaCC 's examples directory for a possible ready-built solution .
您在自己编写解析器之前,一定要查看JavaCC的examples目录,以便可能获取已构建好的解决方案。
-
Note first that JavaCC 's procedural syntax for the topmost simpleLang () production now specifies a return type : SimpleNode .
首先请注意,最顶层的simpleLang()结果的JavaCC的过程性语法现在指定了一个返回类型:SimpleNode。
-
The notation has a syntax of its own , making it expressable in JavaCC .
该表示法有自己的语法,从而使其在JavaCC中是可表达的。
-
The package statement is also placed at the top of the Java helper files that are emitted as part of the generation process ( see The JavaCC compilation process ) .
该package语句也放置在Java助手类文件的顶部,该文件是作为生成过程一部分产生的(请参阅JavaCC编译过程)。
-
JavaCC is a robust tool that can be used to define grammars and easily incorporate the parsing and exception handling for that grammar into your Java business application .
JavaCC是一个健壮的工具,可用于定义语法并且易于在Java商业应用程序中包含该语法的解析和异常处理。
-
The ? debug_parser option that we used during the JavaCC step ensures that the following useful trace messages are output , indicating how the user query is parsed .
我们在JavaCC步骤中所使用的-debugparser选项确保将输出下列有用的跟踪消息,以显示用户查询是如何被解析的。
-
If you 're curious as to what Java code was produced by JavaCC , by all means , have a look ( but don 't try to change any of it !) .
如果您对于JavaCC生成怎样的Java代码感到好奇,就想尽方法看一看(但不要试图进行任何更改!)
-
I 'll explore JavaCC basics briefly and end up spending some time with one of its auxilliary tools , JJTree , without getting sidetracked by too much theory along the way .
我将简要地研究一下JavaCC的基本知识,并在结束的时候花些时间研究一下它的一个辅助工具―JJTree,但是在讨论中不会介绍太多的理论知识,以免偏离主题。
-
It bears some resemblance to what you originally wrote in that queryTerm (), AND , and OR make an appearance but the rest is parsing detail that JavaCC has added around it .
它与您最初在其中写入queryTerm()、AND和OR所呈现的样子有些相像,但其余的就是JavaCC所添加的解析细节。
-
To simplify , it helps to understand that since the quote character itself has meaning to JavaCC , we need to escape the quote for it to be meaningful to our language instead of JavaCC .
简单一点理解就是,由于引用字符本身对于JavaCC是有意义的,因此我们需要将对它的引用转换为对我们的语言而非JavaCC是有意义的。