Re: Question about Parser()

From: Neil Conway <neilc(at)samurai(dot)com>
To: Bin Liu <bliu(at)ece(dot)gatech(dot)edu>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question about Parser()
Date: 2004-10-13 04:05:53
Message-ID: 1097640353.30026.11.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2004-10-12 at 08:13, Bin Liu wrote:
> Can somebody explain how the 'parsetree' in the parser( ) function get
> populated? What I saw is just a NIL. And it is not touched else where
> in this file.

"parsetree" is a global variable; it is defined in parser.c, but
declared (via extern) in gram.y. gram.y constructs the parsetree (via
yacc) and delivers the raw parsetree back to parser() by assigning to
"parsetree" (see the "stmtblock" production in gram.y, for example).

-Neil

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Leeuw van der, Tim 2004-10-13 06:32:22 Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore
Previous Message Bruce Momjian 2004-10-13 00:53:04 Re: [HACKERS] PGPASSWORD and client tools