help-flex
[Top][All Lists]
Advanced

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

Converting from old sun4 lex and yacc to flex and bison on Linux


From: Laura E Fowler
Subject: Converting from old sun4 lex and yacc to flex and bison on Linux
Date: Wed, 26 Apr 2006 12:39:44 -0500


I'm now responsible for some old code (> 10 years old) that is used to generate documentation and header files. It uses lex and yacc and currently is compiled and run on an  old sun4 system. I'm trying to compile it and run it on a Linux system (SGI Altix).

Firstly, I'm not conversant in lex and yacc, so please be gentle. Basically, I needs some pointers in the right direction.

I have gotten the code to compile and run. I managed to correct all of the warning and I also used the -l option when using flex. The resulting tool seems to work fairly well except for one major problem. The files used as input to this tool can include other  files and when an include statement is read, that file should be opened and processed before continuing on with the rest of the current file. The problem is that when an include statement is read, the file is opened and put on a linked list, but not processed. When end of file is reached on the initial file, then the files are popped off of the linked list and processed. This results in them being processed in the wrong order. On the sun4, the files are processed in the correct order.

Can anyone give me any hints of where to look to figure out why the included file is not being processed after it's opened.  Also, some hints on how to debug the flex and bison code would be appreciated.

I tried searching the archives, but didn't come up with anything that would help.

Please let me know if you need more information.

Thanks,

Laura


reply via email to

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