|Looking for RC parser email@example.com (Mojmir Strhan) (1997-08-07)|
|Re: Looking for RC parser firstname.lastname@example.org (1997-08-12)|
|Re: Looking for RC parser email@example.com (1997-08-16)|
|Re: Looking for RC parser firstname.lastname@example.org (1997-08-16)|
|Re: Looking for RC parser email@example.com (Bret D Weinraub) (1997-08-20)|
|From:||firstname.lastname@example.org (Jacob Navia)|
|Date:||16 Aug 1997 00:22:36 -0400|
Mojmir Strhan <email@example.com> writes:
> > I am looking for PCCTS or YACC/LEX based parser for Windows
> > Resource (.RC) files. Parser should be able to parse .RC files
> > produced by Visual C++ 4.x and 5.0.
I have written a resource compiler for my compiler system 'lcc-win32'.
I didn't use yacc/lex because of the following problem:
Many of the keywords in the resource language accept *optional*
arguments. This means within this lex/yacc framework, that you have to write
a rule for each possible option. Many of the optional arguments are classes
of keywords further complicating this problem. The number of rules
exploses, and you get incomplete but enormous parsers that are very
I found that a recursive descent parser was much more appropiate for the
task at hand. I have used this technique that has been discussed (for instance)
in depth in the book of lcc, written by Fraser and Hanson.(1)
I have implemented all resource types but the FONT resource. This type of
resource is only used in the case you want to use a special font within
your program, without installing it in the system.
What Visual C++ (4.0 or 5.0) concerns, it follows (as it should) the specifi-
cations failry close, because it *must* be compatible with Microsoft's
resource compiler 'rc'.
You can find the binary of my resource compiler (for free) in:
Source code licenses/OEM agreements are possible.
(1) A retargetable C Compiler: Design and Implementation. Benjamin Cummings
publisher 1995: pages 102 ff
Jacob Navia Logiciels/Informatique
41 rue Maurice Ravel Tel (1) 126.96.36.199
93430 Villetaneuse Fax (1) 188.8.131.52
Return to the
Search the comp.compilers archives again.