On Mon, Nov 10, 2008 at 01:41:23PM -0500, Tom Lane wrote:
> I experimented with doing this and found that things seemed noticeably
> uglier; for example in createdb_opt_item we have (ignoring the actions)
> 
>             | TEMPLATE opt_equal name
>             | TEMPLATE opt_equal DEFAULT
>             | ENCODING opt_equal Sconst
>             | ENCODING opt_equal Iconst
>             | ENCODING opt_equal DEFAULT
>             | COLLATE opt_equal Sconst
>             | COLLATE opt_equal DEFAULT
> 
> which'd become
> 
>             | TEMPLATE opt_equal name
>             | TEMPLATE opt_equal DEFAULT
>             | ENCODING opt_equal SCONST
>             | ENCODING opt_equal ICONST
>             | ENCODING opt_equal DEFAULT
>             | COLLATE opt_equal SCONST
>             | COLLATE opt_equal DEFAULT
> 
> which at least to me seems confusing --- the ICONST and SCONST
> occurrences look like literal keywords rather than token classes.
> So I find I have a mild preference for the mixed-case spelling.

Fine with me too. Actually I don't think we'll waste a lot of cpu cycles when
keeping the Iconst/Sconst rules as they are.

> One possible way to shave the cycles and still have it look nice
> is to rename the actual tokens produced by scan.l to Iconst and Sconst;
> but this might be more trouble than it's worth.  Thoughts?

I agree that this is not worth it. After all the mixed-case spelling looks like
a non-terminal and at some point people will spend time looking to the rules
defining these non-terminals.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED]
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to