Adding location info to the C++ parser

Roberto Raggi roberto at kdevelop.org
Tue Mar 21 14:57:06 UTC 2006


Hi!

On Tuesday 21 March 2006 14:22, Matt Rogers wrote:
> Actually, once I figured out how many design patterns were used in the
> parser, it was quite easy. :)
great! btw feel free to change the code style.. 

>
> Thanks for adding the code that keeps track of the line numbers. Adam's
> code view already works much better now. :)
sure.. it's not finished yet.. but I'll try to my best and finish it this week

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

> will do, thanks. :)
;-)

ciao robe

-- 
Roberto Raggi - roberto at kdevelop.org
KDevelop http://www.kdevelop.org




More information about the KDevelop-devel mailing list