|
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.
|
[Prev in Thread] | Current Thread | [Next in Thread] |