Re: scanner/parser minimization - Mailing list pgsql-hackers

From Tom Lane
Subject Re: scanner/parser minimization
Date
Msg-id 14204.1362236984@sss.pgh.pa.us
Whole thread Raw
In response to Re: scanner/parser minimization  (Greg Stark <stark@mit.edu>)
Responses Re: scanner/parser minimization  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
Greg Stark <stark@mit.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



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: scanner/parser minimization
Next
From: Robert Haas
Date:
Subject: Re: scanner/parser minimization