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: Patch to improve cpplib's C++ support


>>>>> Zack Weinberg <zack@rabi.columbia.edu> writes:

 > From the front end's point of view, the way it'll work is that
 > cpp_get_token will be a macro that walks down a list of tokens.  Each
 > buffer has its own list.  When you run out of tokens on a list, a refill
 > function gets called, which scans the next chunk of input.  It's the
 > same principle as stdio input buffering.

OK, if the frontend interface doesn't change it sounds good to me.

 > It doesn't do that now; you get a POP token at the end of every included
 > file when reading the original source, and not when rereading .i files.
 > The front ends ignore POP tokens now, so it doesn't matter.  I could
 > make it so that you never saw a POP unless you asked for one for a
 > specific buffer, using ->redirected_input_p or a similar mechanism.
 > Would that be preferable?

I think so.

Jason


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