From: | Chris Dollin <chris.dollin@hp.com> |
Newsgroups: | comp.compilers |
Date: | 19 Dec 2006 01:04:21 -0500 |
Organization: | HP labs, Bristol |
References: | 06-09-02906-09-042 06-09-048 06-09-060 06-09-078 06-09-093 06-12-064 |
Keywords: | C |
Posted-Date: | 19 Dec 2006 01:04:21 EST |
Hans-Peter Diettrich wrote:
> As a solution for this problem in my LL(1.5) C parser, I leave the
> distinction to a stage between the lexer and parser, inside the
> preprocessor. Only in this stage "words" are mapped into keywords,
> typenames and other identifiers. The according "symbol" table is
> initialized with the C keywords, the preprocessor adds to it all
> #defined names, and the parser adds all encountered typedef
> names. This procedure works fine, provided that typedefs always have
> global scope, as is required in C.
Didn't we go round this a while ago? C typedefs can have non-global
scope.
--
Chris "HO. HO. HO." Dollin
[Oops, we did, didn't we. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.