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




> 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.

Excellent, the code proved semi-readable.

That code is working well, now that I got the bugs out.  All
that pointer manipulation made my head hurt at first.  I don't know
how efficient it is; I haven't tried to measure anything about the
new parser yet.  Correctness first.  It seems to be the right abstraction,
though; you kind of queue up things for a while, and then forget
about some of the old ones.  It does allow arbitrary lookahead/pushback
very nicely.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


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