Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Improved heurestics in C++ parser...
Improved heurestics in C++ parser... [message #18127] Thu, 11 September 2008 22:46 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
This is not the "final step" in C++ parser, but it seems to greatly improve its performance by implementing new error recovery heurestics.

In other words, C++ parser is now able to skip things that it does not undestand much better than before... Smile

Mirek
icon14.gif  Re: Improved heurestics in C++ parser... [message #18130 is a reply to message #18127] Fri, 12 September 2008 09:36 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

This must be really tricky algorithm.
As I understand finally TheIDE will have lightspeed & accurate parsing. And it`s great!
Re: Improved heurestics in C++ parser... [message #18132 is a reply to message #18130] Fri, 12 September 2008 10:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Fri, 12 September 2008 03:36

This must be really tricky algorithm.
As I understand finally TheIDE will have lightspeed & accurate parsing. And it`s great!


Actually, not yet. We still need macros - and that is EXTREMELY tricky (just think that you need to detect all macros changes, remember which files are using which macros and reparse them accordingly Smile

Anyway, current heurestics is hopefully able to parse correctly most of U++ sources. Which in turn is quite needed for T++ efforts...

Mirek
Re: Improved heurestics in C++ parser... [message #18156 is a reply to message #18132] Sat, 13 September 2008 17:38 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Just a little thought: when inserting separators into a package, or even opening and closing those separators, Assist++ is checking my packages. It goes real fast, but is quit redundant for separators.
Re: Improved heurestics in C++ parser... [message #18157 is a reply to message #18132] Sat, 13 September 2008 18:08 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
luzr wrote on Fri, 12 September 2008 11:09


Anyway, current heurestics is hopefully able to parse correctly most of U++ sources.

After testing on a lot of code, I can confirm that too. The only thing I could find that kills auto complete up until now was something like this:
Vector<int*>* grade[11] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };

(And yes, that is not a made up example, I do have something similar in my code Sad)
Re: Improved heurestics in C++ parser... [message #18159 is a reply to message #18157] Sat, 13 September 2008 19:12 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Sat, 13 September 2008 12:08

luzr wrote on Fri, 12 September 2008 11:09


Anyway, current heurestics is hopefully able to parse correctly most of U++ sources.

After testing on a lot of code, I can confirm that too. The only thing I could find that kills auto complete up until now was something like this:
Vector<int*>* grade[11] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };

(And yes, that is not a made up example, I do have something similar in my code Sad)



Does it kill it for 'grade' only, or anything that follows is affected as well?

Mirek
Re: Improved heurestics in C++ parser... [message #18161 is a reply to message #18159] Sat, 13 September 2008 19:23 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
luzr wrote on Sat, 13 September 2008 20:12


Does it kill it for 'grade' only, or anything that follows is affected as well?


Anything that follows, but only in current function. The problem seems to be related to initializer list, not the type. More precisely, it doesn't handle the ',' in the initializer list. Initializing with one item works.
Re: Improved heurestics in C++ parser... [message #18163 is a reply to message #18161] Sat, 13 September 2008 19:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Ah, yeah, the new heurestics is basically about detecting the next file-level item in error recovery and putting parser into file-level too. It is not able to solve what happens inside body.

I have noticed the initializer list problem before too (just before implementing heurestics), I guess it is worth fixing (and easy to fix too in fact...).

Mirek
Re: Improved heurestics in C++ parser... [message #18179 is a reply to message #18163] Sun, 14 September 2008 18:48 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
luzr wrote on Sat, 13 September 2008 13:56


I have noticed the initializer list problem before too



Hopefuly, initializer list should be now fixed...

Please check with your testcase.

Mirek
Previous Topic: License changed to 'official' 2-clause BSD
Next Topic: RichEdit / T++ styling keys
Goto Forum:
  


Current Time: Thu Mar 28 15:29:58 CET 2024

Total time taken to generate the page: 0.02473 seconds