OLD
RELEASE
NOTES
This page contains release notes and known issues for the old versions
of JTB, as well as features we had planned
to implement in newer versions. The release notes for the current
version may be obtained here.
Release Notes for JTB 1.1.2
JTB 1.1.2 was released on April 4, 1999. The following features
and changes since JTB 1.1.1 are present in this version:
-
Fixed bug where node class constructors didn't check if their arguments
were null before trying to call setParent() on them. This made manual
creation of syntax trees problematic if certain parts of the tree were
to be left empty.
-
By default, JTB no longer generates parent references into node classes.
Use the new -pp parameter to generate them.
-
Added -f parameter for JTB to generate descriptive node class
field names such as whileStatement and nodeList1 rather
than names like f1 and f2.
-
Added -ns parameter to allow user to specify a superclass for
all node classes. This class must be supplied by the user.
-
Added a new constructor to all node classes which fills in all unchanging
tokens such as < PLUS: "+" > or < CLASS: "class" >
with the proper NodeToken to aid in manual syntax tree construction.
Known Issues for JTB 1.1.2
This section describes currently known problems and bugs in the current
version of JTB. Also listed is a temporary workaround for the problem.
-
JavaCC reserved words (such as EOF, JAVACODE,
TOKEN, etc.) cannot be used as identifiers in Java code sections
of a JTB input file. This includes Java blocks, Javacode productions,
and between the PARSER_BEGIN and PARSER_END keywords
of a grammar file.
-
Fixing this bug will involve numerous changes to the JTB grammar (and thus,
the visitors as well). This is likely to introduce bugs into JTB.
Since the effort to fix the bug is so much greater than the potential benefit
of the bug fix, this bug will probably not be fixed.
-
Workaround: don't use these tokens as identifiers.
-
JAVACODE productions cause JTB to produce erroneous output.
-
JTB will attempt to put JAVACODE productions in the tree, even
if the production is of return type void. For example:
JAVACODE
void skip_to_matching_braces() {
// Code to eat tokens until a matching brace is found
}
void NT() : { }
{
A() skip_to_matching_braces()
}
This will cause JTB to attempt to construct a node of type NT
with children of type A and skip_to_matching_braces,which
is incorrect.
Workaround steps:
-
Make a "dummy" class with the name of your JAVACODE production.
You can copy one of the classes in the syntaxtree directory and
remove all the child references.
-
Change the return value of the JAVACODE production to the name
of the production.
-
Add something along the lines of
return new your_production_name();
at the end of the Java code.
Planned Features
This section lists features planned for future versions of JTB. Features
which have been implemented in the current 1.1 betas may be found in the
old release notes page.
We are investigating the idea of visitor templates which allow you
to set the return types and parameters of visit() methods.
Back
Maintained by Wanjun Wang, wanjun@purdue.edu.
|
Created January 6, 1999.
Last modified June 26, 1999. |