> on AIX 4.3.3 lex fails with
> 
> $ make dtimep.c
> lex -nit dtimep.lex > dtimep.c
> Error: 1285-328 There is not enough memory for final processing.
> make: *** [dtimep.c] Error 1
> 
> lex has a few options for playing with the memory. I'll see if I can
> get a patch to you that doesn't break the flex version.

yikes! it's not that big a program! hmm, in the old lexer, there were
some options at the beginning like so:
%e 2000
%p 5000
%n 1000
%a 4000

I didn't spend too much time looking into them. Could they be memory
usage hints?

> Solaris 2.7 lex fails with:
> 
> lex -nit dtimep.lex > dtimep.c
> lex: illegal option -- i
> Usage: lex [-ewctvnVY] [-Q(y/n)] [file]
> 
> AT&T lex does not support the '-i' case insesitive flag. To simulate
> it, you need to write character translations. I don't recall the
> exact syntax, but it's something like:

I can work around that by massaging the case-sensitive parts and
taking out the -i flag (which will probably make the entire program
run faster, now that I think about it).

> However, even running it minus the -i, it still fails:
> 
> $ lex -nt dtimep.lex > dtimep.c
> "dtimep.lex":line 2: Error: missing translation value
> 
> I'm not sure AT&T lex supports the %option syntax in flex.
> IRIX (6.4/6.5) lex fails with exactly the same errors as Solaris.
> flex seems to work just fine on all of the above, of course.

I might be able to use preprocessor #define's to simulate the %option.

Did either AIX or solaris have a problem with the lexed version
dtimep.c which is in CVS? hopefully that's ANSI C.

> Actually, it's probablly a good idea to keep the .c file in the
> distribution and generate it only if $(LEX) is defined in the
> Makefile. That way, users won't necessarily have to install flex
> if their system doesn't already have some lexer.
> 
> Going a step further, just keep a flex-lexed .c version available,
> and only re-lex it if the installed $(LEX) is actually flex. Doing
> so would somewhat avoid the compatibility problems above. And unlike
> the old reliance on AT&T lex, it's actually possible to get flex
> and install it if it doesn't come with your system.

Is it necessary to re-flex it even if flex is present? what would
change from host to host that would make a locally-done flex more
compatible or useful? if flex on my home machine generates good,
portable C, what is the incentive?

shantonu

Reply via email to