[GRASS5] flex/lex, compatibility

Hi,

can we make flex a requirement for compiling of GRASS5?
The problem is now that some modules can be compiled with either flex or
lex, but one module uses an option "%option lex-compat" which is not
recognized by standard lex.
Under Linux everything is fine, as flex is always installed, but with
Solaris and IRIX some machines have a standard, old-fashioned lex
installed.
Alternatively we could change the module/lex file, but this would
require some investigation on the side-effects.

Do you have other ideas?

cu,

Andreas
--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Andreas Lange wrote:

Hi,

can we make flex a requirement for compiling of GRASS5?
The problem is now that some modules can be compiled with either flex or
lex, but one module uses an option "%option lex-compat" which is not
recognized by standard lex.
Under Linux everything is fine, as flex is always installed, but with
Solaris and IRIX some machines have a standard, old-fashioned lex
installed.
Alternatively we could change the module/lex file, but this would
require some investigation on the side-effects.

Do you have other ideas?

There are some other possible incompatibilities. Sometimes lex is used
standalone for reading config or ascii data files (see mif.l in new
v.in.mif module). This uses `exclusive start states' heavily which also
are said to be incompatible with some other lex variants. I think this
is less aproblem with newer versions of the various lex's but it might
still be good to standardise on one (flex).

Regards

David

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Andreas Lange a écrit :

Hi,

can we make flex a requirement for compiling of GRASS5?
The problem is now that some modules can be compiled with either flex or
lex, but one module uses an option "%option lex-compat" which is not
recognized by standard lex.
Under Linux everything is fine, as flex is always installed, but with
Solaris and IRIX some machines have a standard, old-fashioned lex
installed.
Alternatively we could change the module/lex file, but this would
require some investigation on the side-effects.

Can't this be done in ./configure ? detecting if there is a flex
command, or a lex command. On my linux box, lex is just a shell
script that call flex with the option "lex-compat". I think one
can do that at the Makefile level...

--
Michel WURTZ - DIG - Maison de la télédétection
               500, rue J.F. Breton
               34093 MONTPELLIER Cedex 5

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Michel,

the change will be implemented with the configure system.
But now the problem is that one module uses an option only recognized by
flex. On Linux this causes no problems as flex is always installed (and
called either as flex or with a shell wrapper that calls flex -l). But
the old lex implementations choke on this option.
As David pointed out there may be other incompatibilities, which can be
avoided by making flex a prerequisite.
On systems without flex only some modules compile and i can see no sense
in "downgrading" the other modules to be compatible with lex.

cu,

Andreas

Michel Wurtz wrote:

Can't this be done in ./configure ? detecting if there is a flex
command, or a lex command. On my linux box, lex is just a shell
script that call flex with the option "lex-compat". I think one
can do that at the Makefile level...

--

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Fri, Nov 03, 2000 at 07:25:55PM +0100, Andreas Lange wrote:

On Linux this causes no problems as flex is always installed

Not so, it might not be installed. But if it is installed "lex" is a
symbolic link to "flex". At least this is so on Red Hat and Debian
GNU/Linux.

--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi James,

you are correct, flex is not always installed. But without it you won't
be able to compile grass5 sources. That is what i wanted to say.
I know of no linux system with a non-GNU standard lex. Sometimes lex is
a shell script which calls flex -l (that is flex in lex compatibility
mode).

cu,

Andreas

James Cameron wrote:

On Fri, Nov 03, 2000 at 07:25:55PM +0100, Andreas Lange wrote:
> On Linux this causes no problems as flex is always installed

Not so, it might not be installed. But if it is installed "lex" is a
symbolic link to "flex". At least this is so on Red Hat and Debian
GNU/Linux.

--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'