parsing ".h subset" of c
26 Apr 1999 01:59:41 -0400

          From comp.compilers

Related articles
parsing ".h subset" of c (1999-04-26)
Re: parsing ".h subset" of c (Norman Ramsey) (1999-04-29)
Re: parsing ".h subset" of c (1999-04-29)
Re: parsing ".h subset" of c (Jerry Pendergraft) (1999-04-30)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 26 Apr 1999 01:59:41 -0400
Organization: Nokia Telecommunications.
Keywords: C, parse, question

Hi, a small problem for compiler experts... I don't know much
about compilers myself.

I need a c-parser which parses ".h subset of c", namely
c-files containing usual header declarations such as
type definitions (typedef etc), macros (#define with or
without parameters) and procedure signatures. (No problem if
whole c is parsed).

>From given input parser should output
- all identifiers declared in file and identifier types
- all referred identifers and reference types

For example: in file foo.h is a procedure signature

extern int foobar(int arg1, some_type_t *arg2);

>From this input parser should produce information that
file foo.h
defines identifier
'foobar' of type 'procedure'
and refers to identifiers
'arg1' of type 'int *'
'arg2' of type 'some_type_t *'

I guess there are pd-tools which can be used to get this information.
Any suggestions, what tool(s) and how could be used ?

Post a followup to this message

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