Related articles |
---|
parsing ".h subset" of c ekoskimaa@tne01.tele.nokia.fi (1999-04-26) |
Re: parsing ".h subset" of c nr@labrador.cs.virginia.edu (Norman Ramsey) (1999-04-29) |
Re: parsing ".h subset" of c derek@knosof.co.uk (1999-04-29) |
Re: parsing ".h subset" of c jerry.pendergraft@endocardial.com (Jerry Pendergraft) (1999-04-30) |
From: | derek@knosof.co.uk (Derek M Jones) |
Newsgroups: | comp.compilers |
Date: | 29 Apr 1999 00:36:27 -0400 |
Organization: | Knowledge Software Ltd |
References: | 99-04-083 |
Keywords: | C, parse |
All,
> 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).
Statements are easy to parse. It's the declarations that are hard.
You might as well use a parser for the full language.
Having said that:
void f(void)
{
int i;
typedef int T_AND_L;
T_AND_L: i++;
}
is not always handled correctly.
> I guess there are pd-tools which can be used to get this information.
> Any suggestions, what tool(s) and how could be used ?
gcc springs to mind (lcc does not include a preprocessor).
derek
--
Derek M Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd mailto:derek@knosof.co.uk
Applications Standards Conformance Testing http://www.knosof.co.uk
[lcc didn't have a preprocessor originally, but they added one several years
ago -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.