[ANN] FreeCC 0.9.3 is available.

9 views
Skip to first unread message

Jonathan Revusky

unread,
Jan 13, 2009, 10:12:44 AM1/13/09
to freecc...@googlegroups.com, d...@javacc.java.net
Here is the instant gratification download link:

http://freecc.googlecode.com/files/freecc-0.9.3.tar.gz

For those who don't know, FreeCC is a fork of the JavaCC codebase. It
was forked in May of last year, originally as KawaDD, but then was
renamed to FreeCC. This is the fourth public release.

For an overview of what FreeCC currently brings to the table wrt JavaCC,
see:

http://code.google.com/p/freecc/wiki/NewInFreeCC

In particular, the following two wiki pages will be of interest:

http://code.google.com/p/freecc/wiki/CodeInjection
http://code.google.com/p/freecc/wiki/TreeBuildingEnhancements

As is the case with the earlier releases, most of the development effort
since the previous release has gone into further code cleanup and
refactoring. For the most part, all the new features that have been
added have been trivial to implement, since they were low-hanging fruit
as a consequence of the ongoing code cleanup.

This is the first FreeCC release which completely breaks with
compatibility with older JDK's (pre-1.5). Now, JDK >=1.5 is a dependency
for both the tool itself and generated code. If there is an absolute
need for the generated parser to be used in a JDK 1.4 environment, it
should be possible to achieve this by running your classes through
retrotranslator.

One major thing I should mention is that this release fixes a bug where
case-insensitive lexical matching was broken, at least in some cases.
The bug was because a variable name in a code template was misspelled in
one spot, and it was in a section of the template that was only used if
the grammar contained case-insensitive token matching.

A very noticeable change, one that could, in fact, be initially
unsettling for existing users, is that very many out-of-the-box defaults
have been changed. This is not frivolous (at least IMHO). The defaults
were changed mostly because, when I got down to the task of writing an
introductory tutorial, I came to the conclusion that virtually all the
out-of-the-box defaults were wrong for newbie users. So, now, for
example, tree building is enabled by default. So, if you do not want
tree-building code inserted in your parser, you need to turn it off
explicitly by setting the option of TREE_BUILDING_ENABLED=false. Besides
that, all the following options that used to be off by default, are
now the default: MULTI, SMART_NODE_CREATION, and TOKENS_ARE_NODES are
all on by default.

Another thing that could throw existing users for a (minor) loop is that
the Node/Token/BaseNode API has undergone significant changes. For
example, all sorts of methods have been renamed. Just as an example,
Node.jjtGetNumChildren() was renamed to getChildCount() and so on. Yes,
this will cause existing code not to compile without some retouching,
but the solution is straightforward enough, and cleaner naming will be a
win in the long run. The various publicly visible fields in Token have
been reduced to package visibility, and various getter/setter methods
have been added. This could also break existing code, but will be a win
long-run. There is a new Nodes class that is generated that contains
various utility methods for walking trees of Nodes etcetera. When MULTI
is set to true (which is now the default) FreeCC generates subclasses of
Token for the various token types.

This version contains the beginnings of a jumpstart tutorial for new
users. It is still unfinished, but the first steps of the tutorial are
done (better than nothing) and I am quite eager to get some feedback on
that.

All feedback is welcome. People are encouraged to join the mailing list
here:

http://groups.google.com/group/freecc-devel

For anybody who is interested in getting involved in development, I
think this is an appealing project. Now that the codebase has been
refactored, cleaned up and modularized, there is a lot of low-hanging
fruit in terms of appealing features that could be added and so on.

Regards,

Jonathan Revusky
--
FreeCC Parser Generator, http://code.google.com/p/freecc
Lead Developer, FreeMarker project, http://freemarker.org/

Reply all
Reply to author
Forward
0 new messages