help-bison
[Top][All Lists]
Advanced

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

solution for #include directive parsing


From: Vijayaraghavan Jagannathan
Subject: solution for #include directive parsing
Date: Wed, 24 Oct 2001 15:03:45 +0530

Hi mathew, thanx for getting back.
 
I have two solutions for the problem:
 
1. A preliminary level parsing that parses only the #include section can be written.  It will identify the files.  With this info, the files can be merged together. Thus a single source input file could be formed outside the context of parsing functionality.  The resultant source file can be sent to the parse function.
 
2. Try Bison to parse a stream !  i.e. read all the files and form an image of the syntax in the memory.  This stream could then be passed to the yyparse of bison.  This is a bit difficult and working on it.  Moreover I am working on a GUI that will debug the source.  Hence streams arent efficient way to handle it.
 
The above solution seem to out of way and required more processing on the calling end than at the functionality end.  If we want to completely abstract the implementation behind the functionality, it would be better.  Hence I require a direct method that will parse this #include statements.
 
Thanx in advance.
 
 
----- Original Message -----
Sent: Wednesday, October 24, 2001 2:03 PM
Subject: Re: Hi

On Tue, 23 Oct 2001, Vijayaraghavan Jagannathan wrote:

> Hi all, I have the following requirement.  Can anyone suggest a method by
> which this can be solved.

Boy, this reeks of an assignment.  Have you even attempted it yourself?


--
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer
address@hidden


reply via email to

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