User forums > Help

C++ parser errors

(1/3) > >>

I'm evaluating C::B as replacement of Dev-cpp and found some errors:
1) First  of all class templates seemes parsed totally incorrectly
I got a lof of dublicate, bogus and out-of-place "symbols" (in selfnamed tab). I even got class named ">" and const named ",".
2) Also there can be something wrong with comment skipping in folding - C-style comments skipped properly, but C++-style ones not - it get commented } as end-of-group (noticed on commented code with } at line end).
3) Moreover if I choose "Jump to declaration" from context menu - I get to line next to expected.
4) Unnamed enum causes all defined in it constants (also last ",") appear in global scope independ of there is was really defined (see code below)

--- Code: ---namespace ... {
class ... {
enum {
// full skip, even [{] and [}] skipped
// forces m_state.m_skip = true
// used to skip up to end group things not skipped otherwise
// current depth of table - possible values are 1 and 2; 3 and more are ignored
// current destination - see Dest enum
// either finish reached
// forces odDest = dNone
// forces m_state.m_skip = true
// used to check item correctness

--- End code ---

5) Every reload of tree indirectly (e.g. through saving file) leads to append of updated items to end instead of replace
I think there are more but those I found in couples of minutes and stop research.

PS. If not clear - most of above is about "Symbols" tab at left side of main window
PSS. Sorry for my English, it's not my primary language, but I tried :)
PSSS. Win/XP-SP2 C::B/1.0-b6

Just to add
I post link to this topic in bug report about symbols tab (
If needed I can provide example which causes template misparsing. But as I can see in sourses parser support of templates is very rudimentar, and so it is not quick fixable...

Yes, I think that the parser should be labelled "experimental". At least that won't catch users off-guard (i.e. expecting a commercial-grade class browser, and getting errors)

I started fixing some class-parser bugs. All submitted class-parser related bugs are now fixed.

--- Quote ---But as I can see in sourses parser support of templates is very rudimentar, and so it is not quick fixable...
--- End quote ---

Templates support is not rudimentary... it's non-existent...

EDIT: to clarify "non-existent", no special handling is done for templates. They 're seen as normal classes.


Well, I see, that they are not handled in special [read any] way, but misparsing is there :)

Member specializations do not appear in list at all, example:

--- Code: ---template<typename Typename>
class Class { void member(); /*...*/ };
void Class<void>::member() { /*...*/ }

--- End code ---

Class specializations (at least one of them) appear as class named ">", example:

--- Code: ---template<typename Typename>
class Class : public Base { /*...*/ };
class Class<void> : public Base { /*...*/ };

--- End code ---

Template members (defined outside of class) appear twice - once in class itself, and second sibling to it, example:

--- Code: ---template<typename Typename>
Class { void member1(); std::string<Typename> member2(); /*...*/ };
template<typename Typename>
Class<Typename>::member1() { /*...*/ }
template<typename Typename>

--- End code ---

This example leads to:

--- Code: ---- Class
| | - member1() : void
| | - member2()
| - member1() : ::
| - member2() : ::

--- End code ---

Also, as I mentioned earlier when I select "Jump to declaration" in context menu, I jump to line next to expected


[0] Message Index

[#] Next page

Go to full version