This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Objective C lexer - small cleanup


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]