[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-devel
Subject: Re: Adding location info to the C++ parser
From: Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date: 2006-03-22 10:06:48
Message-ID: 200603221006.49909.Richard_Dale () tipitina ! demon ! co ! uk
[Download RAW message or body]
On Tuesday 21 March 2006 13:56, Roberto Raggi wrote:
> > hmm, yes, this is a good idea too. However, Richard Dale came up with a
> > nice idea of having two sets of tokens, which i quote below:
>
> hmm, you don't need two set of tokens (or token positions).. token streams
> are very expensive, and column poisitions are *unstable* only in code
> generated by a substitution. Maybe you can generate a #pragma directive
> before the expanded code. The #pragma directive needs some information. For
> instance,
> - the original position
> - the macro definition (useful for code refactoring)
> - the start position of the actual arguments
> - ...
I wasn't meaning to suggest having duplicate sets of tokens streams, just a
way of telling whether a particular C++ token had originated via a
pre-processor expansion or whether it was in the original source. You can
even have nested pre-processor expansions, and it isn't obvious what to do
about them.
-- Richard
_______________________________________________
KDevelop-devel mailing list
KDevelop-devel@barney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic