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: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: Objective C lexer - small cleanup
- From: "Zack Weinberg" <zackw at Stanford dot EDU>
- Date: Thu, 28 Jun 2001 23:46:22 -0700
- Cc: Stan Shebs <shebs at apple dot com>, gcc-patches at gcc dot gnu dot org
On Fri, Jun 29, 2001 at 07:17:35AM +0100, Neil Booth wrote:
>
> > 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.
Nothing stops the @ from being an acceptable leading character in an
identifier, _and_ a token in its own right if it isn't followed by
identifier characters.
> 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.
Is this because you want to change the lookahead mechanism, or you're
worried about it not working correctly, or what?
> 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.
I looked at it briefly. Yes, we do want to share code there. I think
we need to let Mark refine his design a bit more so he knows what it
needs, first.
--
zw "But that means every licensed realtor in America is a creature from outer
space!" I shouted. "What are we going to do about it?"
"Well," said Osgood Sigerson, the world's greatest detective, "I suppose
we'll just have to live with it."
-- Daniel Pinkwater, _The Snarkout Boys and the Avocado of Death_