Thread: Re: [HACKERS] lex/flex portability PB in version 6.3.1

Re: [HACKERS] lex/flex portability PB in version 6.3.1

From
Andrew Martin
Date:
> On Sat, 4 Apr 1998, Erwan MAS wrote:
>
> > Hello ,
> >
> > in version 6.3.1 of the file src/interfaces/ecpg/preproc/pgc.l .
> > There are some flex specific code .
> > like :
> >   %option ( no fatal )
> >   <<EOF>> ( fatal error )
> >
> > my os was solaris 2.6. with standart lex .
> >
> > So if i want to compile , postgres I must use flex .....
>
>     Actually, I hate to say it, but its pretty much recommended that
> anyone using PostgreSQL use flex/bison...in particular, we're starting to
> find that 'stock yacc' on some systems chocks on gram.y, because its just
> gotten to be *very* large...
>

6.3.1 now breaks under Irix lex as well.

If we're going to REQUIRE flex rather than lex, this MUST be made clear
in the installation docs!!!!


Andrew

----------------------------------------------------------------------------
Dr. Andrew C.R. Martin                             University College London
EMAIL: (Work) martin@biochem.ucl.ac.uk    (Home) andrew@stagleys.demon.co.uk
URL:   http://www.biochem.ucl.ac.uk/~martin
Tel:   (Work) +44(0)171 419 3890                    (Home) +44(0)1372 275775

Re: [HACKERS] lex/flex portability PB in version 6.3.1

From
"Thomas G. Lockhart"
Date:
> > > in version 6.3.1 of the file src/interfaces/ecpg/preproc/pgc.l .
> > > There are some flex specific code .
> > > like :
> > >   %option ( no fatal )
> > >   <<EOF>> ( fatal error )
> > Actually, I hate to say it, but its pretty much recommended that
> > anyone using PostgreSQL use flex/bison...in particular, we're
> > starting to find that 'stock yacc' on some systems chocks on gram.y,
> > because its just gotten to be *very* large...
> 6.3.1 now breaks under Irix lex as well.
> If we're going to REQUIRE flex rather than lex, this MUST be made
> clear in the installation docs!!!!

We do not (or should not, rather) _require_ flex for an installation. We
started shipping the flex output for the main scanner after we started
using "exclusive states" (unsupported in old AT&T lexers) to simplify
the scanner code.

Similarly, we ship the bison output for the parser.

Michael, if these flex features are not adding capability, can you
remove them? If they are very helpful, then can we start including the
pgc.c flex output in patches and into the distribution? We would need to
change the Makefile to keep it from deleting pgc.c when doing a "make
clean". We also need to be careful that the file creation times on the
files in the cvs tree are in the proper order so that make won't try
recreating the output...

                      - Tom