help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lex-flex incompatibility


From: Muthumeena M
Subject: lex-flex incompatibility
Date: Fri, 11 Jul 2003 12:16:58 +0530

Hi,
Right now am porting an application which has few lex and yacc files from
solaris to linux.

The application has no problem in solaris whereas when i compile the same
in linux, it is getting stuck at the compilation of the file generated by
lexer i.e the lex.yy.c file

The lex output (lex.yy.c) are also quite different in solaris and linux.

The compilation errors are
1. In function `unsigned char input()':
`yysptr' undeclared (first use this  function). it goes on to many other
undeclared errors.

For this there were no variables declared in the file.l (lex input file).
Solaris had delared on its own, whereas in case of linux error was coming
in yy.c.
So i have manually declared in case of linux.
I do not know the reason why this incompatibility is there.


2. After the manual declaration of variables now it is giving
"previous declaration of int yywrap() with C++ linkage
conflicts with new declaration with C Linkage"
and many like this.

I have tried including the -lfl option while compiling and -l option while
lexing, but they were of no help.

Should the .l file be re-written?
Am unable to decide whether file has to be rewritten or some minor change
in existing file will do the needful.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]