Adding new modifier to GCJ front-end
Angelo Corsaro
corsaro@cse.wustl.edu
Mon Sep 29 06:58:00 GMT 2003
Hello Tom,
On Sun, 2003年09月28日 at 15:35, Tom Tromey wrote:
> Angelo> What are the rationale behind having the modifier sorted?
>> Hmm, there may be some other subtle dependency on the order. If I
> ever knew, I forgot.
I figure it out, so it is probably worth to add some docs
into the parse.y file. The reason why those token have
to be maintained in that exact order is that all the
algorithm that use them rely on their relative position
in order to create the corresponding code. For instance,
when the lexer finds a "protected" modifier passes to
the parser the code "3", then the parser just does
1 << 3 in order to create the ACC_PROTECTED flag.
> Angelo> What is the purpose of PAD_TK?
After figuring out that, it was apparent that the PAD_TK
is kept there just to make thing working since the code that
corresponds to its position (it is the 10th pad) is already
used by ACC_INTERFACE.
Thanks a lot for your help.
Cheers,
Angelo
--
Angelo Corsaro
Department of Computer Science
Washington University
http://tao.doc.wustl.edu/~corsaro
More information about the Java
mailing list