[antlr-interest] [C-target] Child-parent relationship

Jim Idle jimi at temporal-wave.com
Wed Apr 27 06:59:15 PDT 2011


I think that you may looking too deep in to this matter. What problem are
you trying to solve?

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of ??????? ?????
> Sent: Wednesday, April 27, 2011 3:53 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] [C-target] Child-parent relationship
>
> ---------- Пересланное сообщение ---------- От кого: Дмитрий Ильин
> <dmitry.m.ilyin at gmail.com>
> Дата: 27 апреля 2011 г. 17:49
> Тема: [C-target] Child-parent relationship
> Кому: antlr-interest at antlr.org
>
>
> Hi!
> Please correct me if I'm wrong. When constructing AST, child-parent
> relationships are created by calling "freshenPACindixesAll" in function
> "addChild"?
> If so why "freshenPACindixesAll" is called only in one branch of if-
> statement?
> (antlr3basetree.c)
>
> Why do we do selected action in function "setParent"? As a parent of
> "tree"
> we set parent of "parent".
>
> static void
> setParent (pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE parent) {
> ((pANTLR3_COMMON_TREE)(tree->super))->parent = parent == NULL ? NULL :
> ((pANTLR3_COMMON_TREE)(parent->super))->parent;
> }
>
> Dmitry Ilyin
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address


More information about the antlr-interest mailing list