This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Adding new modifier to GCJ front-end


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]