[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Actions for Javas class_declaration
From: |
Andreas Leppert |
Subject: |
Re: Actions for Javas class_declaration |
Date: |
Fri, 21 Nov 2008 07:02:56 +0100 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
>> Furthermore, I would have expected something like this:
>>
>> modifiers CLASS_TK identifier super interfaces class_body
>> { create_class ($1, $3, $4, $5, $6); }
>>
>> I mean the body of a class should be attached to the class declaration,
>> shouldn't it?
>
> We need to consider the rest of the grammar, but I would guess that
> it's done this way so that the class is available for use when parsing
> the body, and that semantic actions within class_body would add to
> the class. If you have the action at the end, the class would not be
> created until after the class body is processed.
>
Well, if it's possible to add the class_body node to the abstract syntax
tree afterwards, that would make sense.
Thanks,
Andreas
--
^^^ | Andreas Leppert
d(O_o)b | GPG/PGP-Key-ID: 0x4845F397
>-|-< | GPG/PGP-Finger: E3C0 8438 6F0C 2D02 5E0C
/ \ | 0306 E847 964A 4845 F397
| Jabber-ID: address@hidden
| ICQ#: smas][or 104361704
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments