This is the mail archive of the 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: Better memory management in cpplib

> On your parser branch I glanced at what you're doing for your
> tentative parsing.  It seemed to be a bit more complicated that I
> thought was necessary; but more on that some other time.  I think you

That's probably true.  I would certainly like to eventually lose the
tentative diagnostic stuff.  There's no abstract reason why we should
be issuing error messages during tentative parsing.

> too are having to copy tokens around and keep track of their original
> location, which is tedious and boring.  Your job would be much easier
> if you could just maintain a pointer to a token, and be assured that
> the token it points to won't go away at some inconvenient moment.

Well, I didn't find the current scheme difficult -- but saving the
copies would be great.  And I'd certainly like to lose the source
position information that I'm current saving.

Your interface sounds reasonable to me, and it would indeed simplify
and improve the efficiency of the C++ parser code.


Mark Mitchell         
CodeSourcery, LLC     

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