This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Adding new modifier to GCJ front-end
- From: Angelo Corsaro <corsaro at cse dot wustl dot edu>
- To: GCJ <java at gcc dot gnu dot org>
- Date: Sun, 28 Sep 2003 15:18:46 -0500
- Subject: Adding new modifier to GCJ front-end
- Organization: Washington University
- Reply-to: corsaro at cse dot wustl dot edu
Hello All,
I am trying to add a new (non-standard) modifier to the GCJ
front-end. But I've struggled with some peculiarities that
seem to be associated with the treatment of modifiers.
I saw the intimidating comment at parse.y:481
/* Modifier TOKEN have to be kept in this order.
Don't scramble it */
How should I go adding my modifier? The modifier I am
trying to add is PHANTOM_TK. In order to do so I've
defined:
- #define ACC_PHANTOM 0x0800 (in java-tree.h)
And added the proper definition in the gperf related files,
and changed lex.c, and extended the size of the modifier_ctx
array.
The issue I am facing is that the parser does not
actually work. And it does no work even for files that
don't contain the new modifier. I guess there is some
subtle issue that has to do the way the current parser
plays with modifiers.
Does anybody know what is actually going wrong?
What are the rationale behind having the modifier sorted?
What is the purpose of PAD_TK?
Thanks a lot in advance,
Angelo