Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Using GOLD parser for the class browser

(1/3) > >>

Hey, I was reading the GOLD parser webpage ( ), and I think it's a very neat idea. This way we could work on OTHER languages and make this a more generic IDE. Imagine working on LUA or PYTHON using Code::Blocks!

So, what's the feasibility of using GOLD?

I did not understand from your post whether CB is using Goldparser or any other Parser currently. Anybody familiar with the internals knows about that?

This actually is an area where I really would like to contribute and create a plugin  (just don't have time right now). To be more specific, I would like to use codeblcoks as IDE for Actionscript (with mtasc as compiler)  beause my projects are a mixture of C++ and Flash. The Goldparser has no Actionscript-grammer yet, but has a version adapted to wxWidgets (by the guy who created the wxForum). For other parsers there  exist higher variety of available grammers.

Is anybody else interested in this kind of stuff ?
Anybody can telll about experiences already trying to adapt CB to other languages ?

No, we're using a "do-it-yourself" parser programmed by Yiannis. (Actually I think it's the same parser used in Dev-C++, but i'm not sure...)

The problem with this parser is that it doesn't support C++ templates, and also is hardcoded. If we switched to the GOLD parser, we wouldn't have any related problems - and it would also enable us to parse non-c++ projects.

So the question is, how to integrate the GOLD parser into Codeblocks? (the code is located in the CodeCompletion plugin)

Sorry to put out your enthusiasm but GOLD parser is not suitable for the task. With GOLD parser engine you can write a compiler's parser, not a C++ IDE's parser for class browsing. The latter has to make tradeoffs between full preprocessing and performance, and it must at least try to cope with incorrect C++ while the user is editing the code. GOLD parser simply cannot handle that. Meanwhile Exuberant CTAGS ( is a mature opensource tool designed specifically for class browsers. Some commercial IDEs (notably ZEUS) use ctags, and it is the native class browser engine in vi and emacs. My advice is don't reinvent the wheel, go ctags!

Okay, thanks for the advise! (Don't you love being part of a collaborating community?)


[0] Message Index

[#] Next page

Go to full version