Adding new modifier to GCJ front-end

Angelo Corsaro corsaro@cse.wustl.edu
Sun Sep 28 20:43:00 GMT 2003


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /