>> 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: [EMAIL PROTECTED] | ICQ#: smas][or 104361704 () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison