This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Objective C lexer - small cleanup
- To: Zack Weinberg <zackw at stanford dot edu>
- Subject: Re: Objective C lexer - small cleanup
- From: Stan Shebs <shebs at apple dot com>
- Date: Thu, 28 Jun 2001 18:13:09 -0700
- CC: gcc-patches at gcc dot gnu dot org
- References: <20010628170307.J432@stanford.edu>
Zack Weinberg wrote:
>
> This patch cleans up the way Objective C @-prefixed tokens are
> handled. @"string" is fed to the parser as <@> <"string"> and dealt
> with in the grammar. @keyword is handled by cpplib's lookahead
> mechanism and the same context trick we're using for protocol
> qualifiers.
Looks like a good change! I even rolled across the hall and tried
it out on the original author (Steve Naroff)... he had a question,
and I couldn't be sure from inspection - is '@ objckeyword' or
'@ /* cmt */ objckeyword' now valid? It looks like it is, and
in fact it looks like "#define FOO interface" "@ FOO class ..." will
work also. Since this would be a compatible extension of the
existing language, it's not really a problem, just sort of a weird
consequence as far as I can tell.
In any case, let's try putting it in, unleash Cocoa and GNUstep
folks on it to see how it works in practice.
Stan