Re: automatic parser generation for ecpg

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: automatic parser generation for ecpg
Дата
Msg-id 18015.1224592314@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: automatic parser generation for ecpg  (Mike Aubury <mike.aubury@aubit.com>)
Ответы Re: automatic parser generation for ecpg  (Mike Aubury <mike.aubury@aubit.com>)
Re: automatic parser generation for ecpg  (David Fetter <david@fetter.org>)
Список pgsql-hackers
Mike Aubury <mike.aubury@aubit.com> writes:
> Also - for completeness (for the list) - I think the plan is to convert the 
> awk to perl (via a2p + some tweaking) if awk is not already used as part of  
> the build process (to avoid adding another prerequisite..)

Hmm.  I believe the current state of play on that is:

* awk is required to build from source on non-Windows platforms
(cf genbki.sh, Gen_fmgrtab.sh, and various random uses in the Makefiles)

* perl is required to build from source on Windows (all the build scripts)

* perl is required to build from a CVS pull on non-Windows too, but we
avoid requiring this for builds from a distribution tarball (by
including the relevant derived files in the tarball)

* we get around the awk requirement on Windows by maintaining parallel
code that does the same things in perl :-(

So it's all pretty messy and neither choice is exactly desirable.
I think maintaining parallel versions of an ecpg parser generator
would be no fun at all, though, so the perl choice seems more or less
forced.  We could either preserve the current state of play by shipping
the derived bison file in tarballs, or bite the bullet and say perl
is required to build from source in all cases (in which case I'd be
inclined to try to get rid of Gen_fmgrtab.sh etc).

As against that ... does a2p produce code that is readable/maintainable?
If the code wasn't perl to start with I'd be a little worried about
ending up with ugly hard-to-read code.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Theodore Wong
Дата:
Сообщение: TSEARCH2 Thesaurus limitations
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: SSL cleanups/hostname verification