Re: Parsing text file with #include and #define directives

2008-04-25 Thread python
Arnaud, Wow!!! That's beautiful. Thank you very much! Malcolm I think it's straightforward enough to be dealt with simply. Here is a solution that doesn't handle errors but should work with well-formed input and handles recursive expansions. expand(filename) returns an iterator over expanded

Re: Parsing text file with #include and #define directives

2008-04-24 Thread Arnaud Delobelle
[EMAIL PROTECTED] writes: > I'm parsing a text file for a proprietary product that has the following > 2 directives: > > #include > #define > > Defined constants are referenced via <#name#> syntax. > > I'm looking for a single text stream that results from processing a file > containing these d