Re: gram.y=>preproc.y - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: gram.y=>preproc.y
Date
Msg-id 491888BD.7030701@dunslane.net
Whole thread Raw
In response to Re: gram.y=>preproc.y  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: gram.y=>preproc.y
Re: gram.y=>preproc.y
List 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




pgsql-hackers by date:

Previous
From: "Brendan Jurd"
Date:
Subject: Re: Patch for ISO-8601-Interval Input and output.
Next
From: Tom Lane
Date:
Subject: Re: gram.y=>preproc.y