Re: Parsing C++ headers?

Graham D Parrington <>
18 Apr 1996 00:32:28 -0400

          From comp.compilers

Related articles
Parsing C++ headers? 104316.1514@CompuServe.COM (John Mitchell) (1996-04-06)
Re: Parsing C++ headers? (1996-04-08)
Re: Parsing C++ headers? cag@Cs.Nott.AC.UK (Cleveland A Gibbon) (1996-04-11)
Re: Parsing C++ headers? (1996-04-14)
Re: Parsing C++ headers? (1996-04-16)
Re: Parsing C++ headers? (Graham D Parrington) (1996-04-18)
Re: Parsing C++ headers? (1996-04-18)
| List of all articles for this month |

From: Graham D Parrington <>
Newsgroups: comp.lang.c++,comp.compilers
Date: 18 Apr 1996 00:32:28 -0400
Organization: University of Newcastle upon Tyne
References: 96-04-033 96-04-078
Keywords: C++, parse

John Mitchell <104316.1514@CompuServe.COM> writes:
>I want to parse C++ header files, and extract information about the
>contained classes and their interface. A yacc-able grammar for this
>type of problem ( or superset of it, as for compilation) would be a
>great help. I'm aware of a grammar for C++ 2.0 out there - is there a
>later version supporting templates?

You could always look at the C++ stub generator that's part of Arjuna.
That has to read C++ headers and pick out classes, determine
inheritence etc in order to be able to reproduce equivalent classes
that do RPC. It has a yacc parser for a grammer that supports
templates to some extent (it is not complete w.r.t the current ANSI
spec but it does a fair job). The stub system is described in Usenix
Computer Systems Vol 8 No 2. You can get Arjuna source and papers
(including the stub system) from

Have fun!

POST = Dept. of Computing, The University, Newcastle upon Tyne, UK NE1 7RU
VOICE = +44 191 222 8067 FAX = +44-191-222-8232

Post a followup to this message

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