Re: Question about Parser() - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Question about Parser()
Date
Msg-id 1097640353.30026.11.camel@localhost.localdomain
Whole thread Raw
In response to Question about Parser()  ("Bin Liu" <bliu@ece.gatech.edu>)
List 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




pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: PL/PgSQL for counting all rows in all tables.
Next
From: "Dave Page"
Date:
Subject: Re: PL/PgSQL for counting all rows in all tables.