Re: Speeding up the Postgres lexer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Speeding up the Postgres lexer
Дата
Msg-id 16268.1116902625@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Speeding up the Postgres lexer  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Speeding up the Postgres lexer  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: Speeding up the Postgres lexer  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> On Mon, 2005-05-23 at 12:31 -0400, Tom Lane wrote:
>> doesn't seem to be any way to get flex to complain if someone later
>> makes a change that breaks the no-backup-cases property again.

> After some digging, there is a  -b option will generate a file called
> lex.backup if any backup-states exist. The file is said to contain
> information that would help you remove backup-states. 

Right, reading that file is how I learned to fix it ...

> It seems straightforward to test for the existence of that file in the
> build process? Or perhaps add a special test state --enable-flextest to
> perform the test during the build.

Well, the problem is that the "success" state isn't that the file
doesn't exist or is empty or anything so easy as that.  What you
want is for it to say
No backing up.

and it seems a tad too ugly to code such a test into the makefiles.
I'd not want to bet that the success message is spelled the same way
in every flex version, or is locale-independent.

Based on the comments so far in this thread, I'll go ahead and commit
the patch, with some comments attached of course --- in particular a big
head comment to run flex with -b and see that lex.backup says something
to this effect.
        regards, tom lane


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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Deadlocks in 7.4.x ...
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Speeding up the Postgres lexer