Related articles |
---|
Implementing %INCLUDE in flex saraswathi@hotmail.com (1997-10-26) |
From: | saraswathi@hotmail.com |
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.
Saraswathi
saraswathi@hotmail.com
[Sounds like your parser is reading ahead farther than you think it is.
-John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.