Re: gram.y=>preproc.y

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Meskes <meskes(at)postgresql(dot)org>, PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gram.y=>preproc.y
Date: 2008-11-10 19:17:17
Message-ID: 491888BD.7030701@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David E. Wheeler wrote:
> On Nov 10, 2008, at 8:03 AM, Tom Lane wrote:
>
>> We should probably standardize on the perl version, ugly or not, because
>> otherwise we'll have a difference in build process between Unix and
>> Windows machines. Personally I don't really care how ugly it is as long
>> as no one has to look at it ;-) ... but if someone wants to beautify the
>> perl script they're surely welcome to do so.
>
> I'd be happy to, but I haven't really been following this thread. What
> does it do, and how do I make sure it continues to work as I refactor it?
>
> I'm fine to wait until it's committed, too.
>
>

I have had a quick look at it. The perl is more than ugly - it's
unmaintainable IMNSHO. It violates perl best practice in many ways, and
reflects the age of the a2p utility quite badly.

There is no guarantee that the script won't have to be looked at.
Rather, the reverse is our experience, so this is a real consideration.

I agree that a perl version is much more desirable, but it really
requires a hand translation from awk rather than a hacked a2p output.

David, how is your awk-fu? If it's any good then I'm happy to leave it
to you. Otherwise I will try to make a few hours somewhere to un-uglify
this.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-10 19:37:32 Re: gram.y=>preproc.y
Previous Message Brendan Jurd 2008-11-10 19:15:40 Re: Patch for ISO-8601-Interval Input and output.