Re: Speeding up the Postgres lexer - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Speeding up the Postgres lexer
Date
Msg-id 16268.1116902625@sss.pgh.pa.us
Whole thread Raw
In response to Re: Speeding up the Postgres lexer  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Speeding up the Postgres lexer
Re: Speeding up the Postgres lexer
List 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 by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Deadlocks in 7.4.x ...
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: Speeding up the Postgres lexer