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: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Fri, 29 Jun 2001 07:17:35 +0100
- Cc: Stan Shebs <shebs at apple dot com>, gcc-patches at gcc dot gnu dot org
Zack Weinberg wrote:-
> Yes, that is now accepted. I think it has been acceptable since the
> introduction of the integrated preprocessor: the leading @ and the
> keyword have been separate tokens since then.
Only since February-ish.
> That *could* be changed: cpplib could consider @ an acceptable
> character to start an identifier with, in objc mode. In fact, that
> would simplify the c-parse.in logic quite a bit more. I'll leave that
> decision to you and the other people defining what the language is.
We did that so we can macro-expand what comes after the @. I don't
think what you suggest is possible with that constraint.
I like your patch. I'm just a little wary of getting too much code
dependent on the lookahead mechanism. But that shouldn't stop your
patch going in.
Have you seen what Mark's doing on his C++ parser branch? He's got a
circular token buffer. Eventually we should probably share code to do
this token saving / pushback / whatever you want to call it.
Neil.