JJTree: NODE_FACTORY?



I'm trying to take on a project from another guy that uses JJTree and
JavaCC. It uses JJTree single mode to create a parsetree of all
"SimpleNodes." We then use a visitor to go through and make an AST from
the parsetree. This is fine, a little slow, but it's modular and we
aren't in a hurry.
The problem is, we want to have a little extra data on the parse nodes.
In order to do this, we edit SimpleNode.java. However, if we regenerate
the parser, SimpleNode.java is likely to get overwritten. So, the
previous guy used patch to add in the new data we want via a makefile.
Pretty ingenous, but also a hack. It would be much nicer if I could write
a class that inherits from SimpleNode, say ParseTreeNode.java, that holds
the extra data, and have Parser.java create those nodes.
I thought I good way to do this would be to use NODE_FACTORY=true, but
that doesn't work, because the jjtCreate method goes in SimpleNode.java,
so I'm back to patching that.
Is there anyway simple to get around patching SimpleNode.java?
--
Jim Leek
jrleek@xxxxxxxxxxxxxxxxx

.