Implementing %INCLUDE in flex
26 Oct 1997 22:15:48 -0500

          From comp.compilers

Related articles
Implementing %INCLUDE in flex (1997-10-26)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 26 Oct 1997 22:15:48 -0500
Organization: Compilers Central
Keywords: lex, comment

Actually developing a parser for PL/I in flex & yacc. The problem is
with the implementation for % INCLUDE statements. Tried to do something
similar to what is given in flex manual. But some problems arise with
that usage.

Actually the scanner reads "end of buffer or a NUL" inbetween the main
file where there is no end of file. Actually this problem arises on line
nos. that depend on where the INCLUDE statement is present. It occurs on
a line which is few lines after the INCLUDE statement. The Included file
is opened & parsed correctly!!! If i place the INCLUDE statement towards
the end of the program then the program is successfully parsed!!!!!

Is there a problem of some buffer size???

Help is required urgently!!!

Thanks in advance.
[Sounds like your parser is reading ahead farther than you think it is.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.