Handling typedef in the Roslind C++ parser

stal@ztivax.zfe.siemens.de (Michael Stal)
Mon, 18 May 1992 08:22:41 GMT

          From comp.compilers

Related articles
Handling typedef in the Roslind C++ parser stal@ztivax.zfe.siemens.de (1992-05-18)
| List of all articles for this month |

Newsgroups: comp.lang.c++,comp.compilers
From: stal@ztivax.zfe.siemens.de (Michael Stal)
Keywords: C++,parse,design
Organization: Siemens AG, Munich, W-Germany
Date: Mon, 18 May 1992 08:22:41 GMT

I am currently planning to develop a C++ information abstractor (i.e. a
C++-parser, that extracts detailed information about classes and variables
from C++-sources). For this purpose I want to use the Unix-tools yacc and
lex together with the well known Roskind-grammar. Some questions arise:

- Can anybody provide me with an idea or solution how to cope with the
    TYPEDEFname/IDENTIFIER-problem within the scanner?
    As far as I've found out, a symbol table is not enough. In some
    cases right context must be analyzed additionally. It's very
    interesting, that the scanner of the GNU g++-compiler is not
    generated with flex but hand-crafted instead. Maybe this was caused
    by the same problem (?!).

- Is there any C++-parser (at least C++ v2.1) available in source code,
    which solves the problem?

- Are there any alternatives to using yacc/lex/Roskind-grammar for
    developing commercial C++-parsers?

Thank you very much for all help

Michael Stal

Otto-Hahn-Ring 6
8000 Muenchen 83
Tel: + 49 89 636 49 380
email: stal@ztivax.zfe.siemens.de

Post a followup to this message

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