help-flex
[Top][All Lists]
Advanced

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

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


From: Thurn, Martin
Subject: RE: Converting from old sun4 lex and yacc to flex and bison on Linux
Date: Wed, 26 Apr 2006 14:48:36 -0400

  There is a discussion of "Logical Nesting of Files" on pages 154-156
of the O'Reilly book, across all versions of lex/flex, I suggest you
start there.  Er, SURELY you own the O'Reilly book?
http://www.oreilly.com/catalog/lex/  Buy it now, it will be the best 30
bucks Raytheon ever spent on you 8-)
 - - Martin

P.S. Please send ONLY PLAIN TEXT email to mailing lists.


________________________________

        From: address@hidden
[mailto:address@hidden On Behalf Of
Laura E Fowler
        Sent: Wednesday, April 26, 2006 13:40
        To: address@hidden
        Subject: Converting from old sun4 lex and yacc to flex and bison
on Linux
        
        

        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]