📄 jjtreereleasenotes.html
字号:
<HTML><!--Copyright 漏 2002 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,California 95054, U.S.A. All rights reserved. Sun Microsystems, Inc. hasintellectual property rights relating to technology embodied in the productthat is described in this document. In particular, and without limitation,these intellectual property rights may include one or more of the U.S.patents listed at http://www.sun.com/patents and one or more additionalpatents or pending patent applications in the U.S. and in other countries.U.S. Government Rights - Commercial software. Government users are subjectto the Sun Microsystems, Inc. standard license agreement and applicableprovisions of the FAR and its supplements. Use is subject to license terms.Sun, Sun Microsystems, the Sun logo and Java are trademarks or registeredtrademarks of Sun Microsystems, Inc. in the U.S. and other countries. Thisproduct is covered and controlled by U.S. Export Control laws and may besubject to the export or import laws in other countries. Nuclear, missile,chemical biological weapons or nuclear maritime end uses or end users, whetherdirect or indirect, are strictly prohibited. Export or reexport to countriessubject to U.S. embargo or to entities identified on U.S. export exclusionlists, including, but not limited to, the denied persons and speciallydesignated nationals lists is strictly prohibited.--><HEAD> <title>JavaCC: JJTree Release Notes</title><!-- Changed by: Michael Van De Vanter, 14-Jan-2003 --></HEAD><BODY bgcolor="#FFFFFF" ><H1>JavaCC [tm]: JJTree Release Notes</H1><pre>======================================Changes in 4.0======================================New option NODE_EXTENDS to specify a classname that SimpleNode extends so that boiler plate code can be putin that class. See the examples/Interpreter for an exampleusage.======================================Changes from JJTree 0.3pre5 to 0.3pre6======================================----------------------------------------------------------------Fixed bug where Writers were not being closed correctly.----------------------------------------------------------------======================================Changes from JJTree 0.3pre4 to 0.3pre5======================================----------------------------------------------------------------Fixed a bug where a node annotation #P() caused a null pointer error.----------------------------------------------------------------Only generate the jjtCreate() methods if the NODE_FACTORY option isset.----------------------------------------------------------------Fixed a bug where the name of the JJTree state file was being used inthe declaration of the field.----------------------------------------------------------------======================================Changes from JJTree 0.3pre3 to 0.3pre4======================================----------------------------------------------------------------Made the constructors of nodes public. Also made the node identifierconstants and the associated strings public.----------------------------------------------------------------Fixed a misleading error message that was produced when the outputfile couldn't be generated for some reason.----------------------------------------------------------------Brought the HTML documentation up to date.----------------------------------------------------------------Fixed a bug where the file containing the JJTree state class wasignoring the OUTPUT_DIRECTORY option.----------------------------------------------------------------Fixed a bug where a construction like this: a=foo() #Foowas being incorrectly handled and generating bad Java code.----------------------------------------------------------------Changed the visitor support from a void function to one which takes aparameter and returns a result. This is a non-compatible change, soyou will have to update your code if it uses the visitor support.[Also, if the string option VISITOR_EXCEPTION is set, its value isalso used in the signatures of the various methods in the pattern.Please note: this exception support is very provisional and will bereplaced in a following version by a more general solution. It's onlyhere because I needed it for one of my own projects and thought itmight be useful to someone else too. Don't use it unless you'reprepared to change your code again later. Rob.]----------------------------------------------------------------======================================Changes from JJTree 0.3pre2 to 0.3pre3======================================----------------------------------------------------------------JJTree now uses the same grammar as JavaCC. This means that Java codein parser actions is parsed.----------------------------------------------------------------Added support for the Visitor design pattern. If the VISITOR optionis true, JJTree adds an accept method to the node classes that itgenerates, and also generates a visitor interface. This interface isregenerated every time that JJTree is run, so that new nodes willcause compilation errors in concrete visitors that have not beenupdated for them.----------------------------------------------------------------Added a couple of examples to illustrate the Visitor support.JJTreeExamples/eg4.jjt is yet another version of the expression treebuilder which uses a visitor to dump the expression tree; andVTransformer is a variation of the Java source code transformer.VTransformer is also possibly directly useful as a tool that insertsvisitor accept methods into class files that were generated withearlier versions of JJTree.----------------------------------------------------------------Added the BUILD_NODE_FILES option, with a default value of true. Ifset to false, it prevents JJTree from generating SimpleNode.java andnodes that are usually built in MULTI mode. Node.java is stillgenerated, as are the various tree constants, etc.----------------------------------------------------------------Code that is inserted into the grammar is now enclosed in the standard@bgen/@egen pair.----------------------------------------------------------------The JJTree state object is now generated into its own file if itdoesn't already exist. This is to make it easier to modify.----------------------------------------------------------------Fixed a couple of bugs in the HTML example grammar where the closingtags didn't match the opening tags.----------------------------------------------------------------Fixed a bug where JJTree was trying to clear the node scope whilehandling an exception, even when the node had been closed successfully.----------------------------------------------------------------NODE_FACTORY no longer implies NODE_USES_PARSER.If you have been using NODE_FACTORY, then now you'll also needNODE_USES_PARSER. Unless, of course, you were never using the parserin your node factories.----------------------------------------------------------------Removed not very useful debugging stuff from the JJTree state object.It was causing problems with parsers running in security environmentswhere access to arbitrary properties is disallowed.----------------------------------------------------------------======================================Changes from JJTree 0.3pre1 to 0.3pre2======================================----------------------------------------------------------------The state that JJTree inserts into the parser class is now guarded bythe formal comments.----------------------------------------------------------------The JJTree syntax has been changed so that the node descriptor nowcomes after the throws clause, rather than before it.----------------------------------------------------------------Fixed a bug where string-valued options did not have their quotesstripped.----------------------------------------------------------------Fixed a bug where nodes were being closed early for actions withinZeroOrMore etc., expansion units.----------------------------------------------------------------The special identifier `jjtThis' was not being translated in parameterlists or in the BNF declaration section. Fixed it.----------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -