Re: scanner/parser minimization

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: scanner/parser minimization
Date: 2013-03-02 15:09:44
Message-ID: 14204.1362236984@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <stark(at)mit(dot)edu> writes:
> Regarding yytransition I think the problem is we're using flex to
> implement keyword recognition which is usually not what it's used for.
> Usually people use flex to handle syntax things like quoting and
> numeric formats. All identifiers are handled by flex as equivalent.
> Then the last step in the scanner for identifiers is to look up the
> identifier in a hash table and return the keyword token if it's a
> keyword. That would massively simplify the scanner tables.

Uh ... no. I haven't looked into why the flex tables are so large,
but this theory is just wrong. See ScanKeywordLookup().

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-03-02 15:43:51 Re: scanner/parser minimization
Previous Message Kevin Grittner 2013-03-02 15:06:18 Re: Materialized views WIP patch