Shantonu Sen wrote:
>Did you check these in? They didn't appear to be in the CVS version.

No, I thought it best to just mail you the patch since you were
probablly working on the code anyway to avoid conflicts (and also
since I hadn't tested it against AIX yet). 

I updated my sources and re-ran against Solaris and AIX using lex and
it doesn't appear to work. The file gets lexed without a hitch now,
but the .c file it outputs isn't usable.

On Solaris I get this:

lex -nt dtimep.lex > dtimep.c
gcc -c -DHAVE_CONFIG_H -I.. -I. -I.. -Wall -O2 dtimep.c
dtimep.lex:162: warning: return-type defaults to `int'
dtimep.lex: In function `yylex':
dtimep.lex:167: `YY_BUFFER_STATE' undeclared (first use in this function)
dtimep.lex:167: (Each undeclared identifier is reported only once
dtimep.lex:167: for each function it appears in.)
dtimep.lex:167: parse error before `lexhandle'
dtimep.lex:174: `lexhandle' undeclared (first use in this function)
dtimep.lex:174: warning: implicit declaration of function `yy_scan_string'
dtimep.lex:174: `lexstr' undeclared (first use in this function)
dtimep.lex:214: warning: subscript has type `char'
dtimep.lex:215: warning: subscript has type `char'
dtimep.lex:216: warning: subscript has type `char'
dtimep.lex:217: warning: subscript has type `char'
dtimep.lex:218: warning: subscript has type `char'
dtimep.lex:219: warning: subscript has type `char'
dtimep.lex:220: warning: subscript has type `char'
dtimep.lex:220: warning: subscript has type `char'
(and bunches more)
dtimep.lex:365: warning: subscript has type `char'
dtimep.lex:163: warning: unused variable `yyprevious'
dtimep.lex:181: warning: label `yyfussy' defined but not used
dtimep.lex: At top level:
dtimep.lex:704: warning: missing braces around initializer for `yycrank[0]'
dtimep.lex:1126: warning: missing braces around initializer for `yysvec[0]'
make: *** [dtimep.o] Error 1

On AIX 4.3.3 I get this:

lex -nt dtimep.lex > dtimep.c
gcc -c -DHAVE_CONFIG_H -I.. -I. -I.. -Wall -O2 dtimep.c
dtimep.c: In function `yylex':
dtimep.c:246: `YY_BUFFER_STATE' undeclared (first use in this function)
dtimep.c:246: (Each undeclared identifier is reported only once
dtimep.c:246: for each function it appears in.)
dtimep.c:246: parse error before `lexhandle'
dtimep.c:253: `lexhandle' undeclared (first use in this function)
dtimep.c:253: warning: implicit declaration of function `yy_scan_string'
dtimep.c:253: `lexstr' undeclared (first use in this function)
dtimep.c:262: warning: implicit declaration of function `yylook'
dtimep.c:242: warning: unused variable `yyprevious'
dtimep.c:263: warning: label `yyfussy' defined but not used
dtimep.c: At top level:
dtimep.c:827: warning: missing braces around initializer
dtimep.c:827: warning: (near initialization for `yycrank[0]')
dtimep.c:1249: warning: missing braces around initializer
dtimep.c:1249: warning: (near initialization for `yywcrank[0]')
dtimep.c:1251: warning: missing braces around initializer
dtimep.c:1251: warning: (near initialization for `yysvec[0]')
dtimep.c:1903: warning: return-type defaults to `int'
dtimep.c: In function `yylook':
dtimep.c:1907: warning: unused variable `yyw'
dtimep.c: In function `yywinput':
dtimep.c:2326: warning: implicit declaration of function `mbsinvalid'
make: *** [dtimep.o] Error 1

Autoconf also didn't set up the Makefile to cause lex to be run at
all. I had to rm dtimep.c to get it to lex dtimep.lex, which means
that, as it's set up right now, the flex-lexed version distributed
will be the one that's used always unless someone removes it by
hand. At this point that's probablly what we want, anyway, until this
is fixed.

I'll play with them a bit this afternoon.

--
Doug Morris
Morris Communications & Computer Services, Inc.
http://www.mhost.com/

Reply via email to