Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: rickg22 on April 02, 2005, 01:51:56 am

Title: Using GOLD parser for the class browser
Post by: rickg22 on April 02, 2005, 01:51:56 am
Hey, I was reading the GOLD parser webpage ( http://www.devincook.com/goldparser/ ), 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?
Title: Using GOLD parser for the class browser
Post by: rob on April 03, 2005, 12:48:38 am
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 ?
Title: Using GOLD parser for the class browser
Post by: rickg22 on April 17, 2005, 02:39:15 am
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)
Title: Using GOLD parser for the class browser
Post by: Anonymous on April 24, 2005, 11:42:37 pm
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 (http://ctags.sourceforge.net) 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!
Title: Using GOLD parser for the class browser
Post by: rickg22 on April 25, 2005, 05:49:34 am
Okay, thanks for the advise! (Don't you love being part of a collaborating community?)
Title: Using GOLD parser for the class browser
Post by: Anonymous on April 27, 2005, 04:58:07 pm
Hi All!

The editor used by C::b, if I got right, is the wx style text control derived from "scintilla" style text control which can be easily used for any script/language by adding some sort of configuration file, etc.  All the source code for both wx style text control & "scintilla" style text control is already included in the wxWidgets source package.

Bye.
Title: Using GOLD parser for the class browser
Post by: rickg22 on April 27, 2005, 09:21:19 pm
Yes, but the class brower needs to parse non-open files. Thanks for the suggestion, tho.
Title: Using GOLD parser for the class browser
Post by: Anonymous on April 28, 2005, 02:04:21 pm
As Guest (the other one, not me) suggested, I would use CTags. There's even a libctags or it can be built very easily from the ETags project. ETags is also blindingly fast, even faster than the VS.NET parser.
Title: Using GOLD parser for the class browser
Post by: Anonymous on July 03, 2005, 08:41:05 pm
Where do we get the ctags and etags libraries & executables?

Joe M.
Title: Using GOLD parser for the class browser
Post by: squizzz on July 03, 2005, 10:17:11 pm
ctags - http://ctags.sourceforge.net/
etags - http://shareware.pcmag.com/product.php%5Bid%5D45896%5Bcid%5D128%5BSiteID%5Dpcmag (??? - this doesn't have to be the correct link :) )
Title: Using GOLD parser for the class browser
Post by: Anonymous on July 04, 2005, 01:05:24 am
thanks
Joe M.
Title: Re: Using GOLD parser for the class browser
Post by: grv575 on August 08, 2005, 02:10:16 am
But I think what people want these days is a full intellisense IDE parser.  I could get ctags for ultraedit but would rather use an IDE suited to making programming easier.
Title: Re: Using GOLD parser for the class browser
Post by: jmccay on August 20, 2005, 06:24:23 pm
Is there any way to build on top of ctags to do this.  On my first look at ctags, I noticed one could dynamically keep track of changes to file lines to make adjustments to the ctags line numbers for the file.  Indexing could be done off of the line numbers in the tags file with adjustments made to represent the change in the file.  When the file is saved, the tags file could be updated with the new line numbers.

   As for intellice, is it posibble to build on top of ctags to do something like intellisense?  What exactly is intellisense?  What features do people like about it?

Joe M.