No function list, why?

Roberto Ragusa mail at robertoragusa.it
Wed May 16 16:42:20 BST 2007


Andreas Pakulat wrote:
> On 15.05.07 23:36:43, Roberto Ragusa wrote:
>> Andreas Pakulat wrote:
>>
>>> Well, I was saying C, but what I really mean is basically any function
>>> outside of a namespace (maybe even if it is inside a namespace, I didn't
>>> check that). The navigation tool is part of the class browser which is
>>> really just for that, browsing through classes, it was never really
>>> meant to handle plain functions.
>> I'm not sure to understand your point.
> 
> You can't, because I confused you and Leon :)

Sorry to have partially hijacked Leon's thread.
I was thinking it was the same issue.

>> Are you saying that it used to work "by chance"?
> 
> No, it doesn't work at all for anything but:
> ".c"
> ".cc"
> ".cpp"
> ".c++"
> ".cxx"
> ".C"
> ".m"
> ".mm"
> ".M"
> ".inl"
> "_impl.h"
> 
> Unless somebody changes the code to recognize other files.

Ok, so the list of suffixes is hardcoded. But before 3.4.0 the *.pc
files were being parsed, something has changed for sure.

I used your list to try a dirty trick; instead of recompiling
the whole kdevelop (>50MB rpm binary), I just searched the suffixes
in all the binaries and modified /usr/lib/kde3/libkdevcppsupport.so
with an hex editor to change the ".mm" into ".pc".
And now it's working here with the modified lib.

I hope that the list will be made configurable or that .pc will be
added to the hardcoded list.

> Right, are those .pc files compilable C code? i.e. is the embedded SQL
> (or whatever it was you have in them) inside comments?

They are not exactly compilable. They just look like valid C code with
undefined macros or variables here and there.

The function list extraction works well and the code color highlighter
it's ok too.
A few "Problems" are reported, as "Syntax Error"s.

You can find an example of these files at:
  http://www.db.cs.ucdavis.edu/teaching/sqltutorial/demo.pc

Having a perfect parser and highlighter for this stuff would be
great. It is called Pro*C and used with Oracle, DB2 and maybe
something else.

Best regards.
-- 
   Roberto Ragusa    mail at robertoragusa.it




More information about the KDevelop mailing list