Re: automatic parser generation for ecpg

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: automatic parser generation for ecpg
Дата
Msg-id 20227.1224599150@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: automatic parser generation for ecpg  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-hackers
Michael Meskes <meskes@postgresql.org> writes:
> ... The only manual work I see in the
> future is adding some special ecpg handling. I fully expect this script to
> generate a working parser for every single change in gram.y. However, if some
> new rule needs a different aka non-default handling in ecpg that will remain
> manual, but the automatic process should nevertheless create a parser with
> default handling for this new rule, thus not breaking anything but the new
> feature in ecpg, which of course cannot get broken because it is new.

Hmm --- I hadn't really thought much about the need for the generation
script to make special transformations of some rules, but obviously that
is going to be needed in the places where you have to sew the SQL and
ecpg syntaxes together.  Perhaps there is a good argument for going to
perl just to be sure that we don't get backed into a corner on what can
be done in such cases.  awk is a great tool for certain kinds of tasks,
but it's pretty limited.  For instance, AFAIK you'd be out of luck if
you needed to make two passes over the input.

So my vote at this point would be to convert the script to perl.

Also, never mind the idea about starting to require perl for all build
scenarios.  We'll still ship preproc.y in tarballs because we will still
ship preproc.c in tarballs --- I don't think anyone was lobbying to
start requiring bison to be present for builds from tarballs.  So if
the script is perl we'll have exactly the same build dependency
scenarios as now.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Hot Standby utility and administrator functions
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Withdraw PL/Proxy from commitfest