Re: Looking for RC parser

jacob@jacob.remcomp.fr (Jacob Navia)
16 Aug 1997 00:22:36 -0400

          From comp.compilers

Related articles
Looking for RC parser strhan_m@simultan.ch (Mojmir Strhan) (1997-08-07)
Re: Looking for RC parser itz@rahul.net (1997-08-12)
Re: Looking for RC parser ian@cygnus.com (1997-08-16)
Re: Looking for RC parser jacob@jacob.remcomp.fr (1997-08-16)
Re: Looking for RC parser bweinra@uswest.com (Bret D Weinraub) (1997-08-20)
| List of all articles for this month |
From: jacob@jacob.remcomp.fr (Jacob Navia)
Newsgroups: comp.compilers
Date: 16 Aug 1997 00:22:36 -0400
Organization: Compilers Central
References: 97-08-024 97-08-042
Keywords: parse, Windows

Mojmir Strhan <strhan_m@simultan.ch> 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
slow.


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:
http://www.remcomp.com/lcc-win32


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) 48.23.51.44
93430 Villetaneuse Fax (1) 48.23.95.39
France
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.