Author Topic: I'm afraid I don't have much time to work on C::B....  (Read 31991 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
I'm afraid I don't have much time to work on C::B....
« on: December 07, 2005, 06:21:20 pm »
Hi all, this may be seen as a bad news, or as a recognition of an actual situation. So here goes.

I've noticed that due to circumstances beyond my control, recently i've had very little free time to work on C::B. So I'm afraid I won't be able to fix new bugs or implement new features. Sorry guys :|

As a side note, I'll dedicate myself to improving the code completion plugin. So you may stop considering me as "all-hands person", i'm lowering my rank (morally, i mean) as "plugin developer" now. However, I think i'm still able to do small modifications to the website when required.

I hope that maybe 2 or 3 months from now, my current situation will change and i'll be able to work on revamping the compiler plugin for v2.0.

Wish me luck guys! :)
« Last Edit: December 07, 2005, 06:33:34 pm by rickg22 »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: I'm afraid I don't have much time to work on C::B....
« Reply #1 on: December 07, 2005, 06:25:24 pm »
don't worry - be happy !

( i believe i can understand your situation - my last four month were a nightmare too - pressure pressure and a lot of moved deadlines )

Offline heromyth

  • Multiple posting newcomer
  • *
  • Posts: 98
    • http://
Re: I'm afraid I don't have much time to work on C::B....
« Reply #2 on: December 11, 2005, 12:08:14 pm »
 :(
Wish you are happy!
Hope C:B can still be developed with great progresses.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: I'm afraid I don't have much time to work on C::B....
« Reply #3 on: December 11, 2005, 04:36:38 pm »
I'd been hoping to be able to work on the code completion plugin at some point myself, but I've found myself in much the same situation -- not being able to code as often as I'd like. The reason I mention this is, I found three already-existing libraries that might be candidates for adaption into the plugin:
Synopsis,
Elsa, and
OpenC++
Unfortunately none of them compiled immediately with MinGW (or Msys), and I haven't been able to spend much time adapting them to do so. But if you can get one to work, excellent.

Cheers,
Twilight Dragon
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: I'm afraid I don't have much time to work on C::B....
« Reply #4 on: December 11, 2005, 08:19:52 pm »
Elsa
I am not sure about Elsa, because the actual version has not been ported to mingw32 (even if it works with x86/win2k-SP2/cygwin-1.5.17/gcc-3.4.4).

Michael

takeshimiya

  • Guest
Re: I'm afraid I don't have much time to work on C::B....
« Reply #5 on: December 12, 2005, 11:34:55 am »
I have tried to compile Elsa on mingw32, it compiles smbase right, but the rest fails, mostly because of flex/bison stuff.

And I've tried another C++ parser which seems very complete, called ANTLR C++ (or CodeStore modified version).

It compiles fine on mingw32 (in fact I've compiled it successfully from C::B), and almost out-of-the-box.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: I'm afraid I don't have much time to work on C::B....
« Reply #6 on: December 12, 2005, 11:47:19 am »
I have tried to compile Elsa on mingw32, it compiles smbase right, but the rest fails, mostly because of flex/bison stuff.

The Elsa website says:

Quote
mingw32: Elsa has not been ported to mingw32, though smbase has limited support for it.

This is probably why you can compile smbase, but not the rest. May be it would be for further release...

I have found this website that could be of interest despite it is a bit old:

Michael

takeshimiya

  • Guest
Re: I'm afraid I don't have much time to work on C::B....
« Reply #7 on: December 12, 2005, 01:00:28 pm »
According to that article:

"ANTLR is a parser generator which works on predicated LL(k) grammars.
PCCTS is a C++ grammar for ANTLR (actually, a modified version of ANTLR) supports all C++ features except namespaces.

and

Elsa:
If you are thinking of writing a C++ parser yourself, then use a GLR parser generator such as Elkhound and you'll save yourself lots of hassle. The guy who wrote Elkhound is also writing a C++ parser (including semantic analysis) called Elsa, which can parse everything except STL headers it seems. If you're interested in C++ parsing, it'd be good to have a long look at this project."



That's from 2001. I don't know if ANTLR C++ support namespaces now.
But Elsa can parse them, and it's tested with parsing Mozilla, Qt, ACE, STL source code.


So:
ANTLR C++ can be compiled right now in GCC, Mingw32, MSVC 6 & 7. It's written only using STL code so it's very portable.
Can it parse namespaces?

Elsa seems more complete and better overall, and can be compiled in GCC/cygwin. It's written using portable code also.
The fact that it doesn't work out-of-the-box yet on mingw32 is because the build system (it requieres flex, perl, bison).

So far I would choose Elsa if it worked right now on mingw32.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: I'm afraid I don't have much time to work on C::B....
« Reply #8 on: December 12, 2005, 01:17:41 pm »
According to that article:

"ANTLR is a parser generator which works on predicated LL(k) grammars.
PCCTS is a C++ grammar for ANTLR (actually, a modified version of ANTLR) supports all C++ features except namespaces.

and

Elsa:
If you are thinking of writing a C++ parser yourself, then use a GLR parser generator such as Elkhound and you'll save yourself lots of hassle. The guy who wrote Elkhound is also writing a C++ parser (including semantic analysis) called Elsa, which can parse everything except STL headers it seems. If you're interested in C++ parsing, it'd be good to have a long look at this project."



That's from 2001. I don't know if ANTLR C++ support namespaces now.
But Elsa can parse them, and it's tested with parsing Mozilla, Qt, ACE, STL source code.

Yes, the article is a bit old, but there are some good links (e.g., Edward Willink's "Meta-Compilation for C++" PhD thesis).

So:
ANTLR C++ can be compiled right now in GCC, Mingw32, MSVC 6 & 7. It's written only using STL code so it's very portable.
Can it parse namespaces?

It seems yes: ANTLR Options

Elsa seems more complete and better overall, and can be compiled in GCC/cygwin. It's written using portable code also.
The fact that it doesn't work out-of-the-box yet on mingw32 is because the build system (it requieres flex, perl, bison).

So far I would choose Elsa if it worked right now on mingw32.

May be it would not be very difficult to make it works with mingw32.

Michael

takeshimiya

  • Guest
Re: I'm afraid I don't have much time to work on C::B....
« Reply #9 on: December 12, 2005, 01:36:07 pm »
About ANTLR:

There are 2 versions of it, PCCTS 1.33 is the previous version of ANTLR, which was written in C. It is not maintained anymore.

And ANTLR 2.75 is the latest version and actively mantained. It supports templates and it's better overall than PCCTS.
The downside is that is written in Java. But don't run away, remember that ANTLR is a parser generator, not a parser.
Because it can generate a C++ parser (among many other languages) written in C++ code.

About Elsa on mingw32:
I don't think it would be difficult making it work on mingw32, but someone with *nix expertise is needed, because the build system uses the utils I've described above (flex, bison, perl) which I don't understand what they do.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: I'm afraid I don't have much time to work on C::B....
« Reply #10 on: December 12, 2005, 04:20:03 pm »
That something is designed only to be compiled on *nix systems does not preclude modifying it to be compiled with MinGW32/GCC. :)
I indeed failed to mention ANTLR, for which there is a C++ grammar available for download from the website (no modifications necessary to ANTLR itself). If the grammar and associated constructs were written right, it could be a leaner and meaner option than the three I already mentioned; but getting a semantically viable C++ grammar and parser going is a ton of work.

To expand a bit on the original three --

Synopsis was my first choice. It includes a C++ API out-of-the-box (Synopsis' primary design is as a Python module, but the C++ API does not require it) that would (IMHO) be fairly simple to drop into a code completion / visual assist framework. Also, it is ADVERTISED as being compilable by Windows compilers using the Python build system. Unfortunately, this is incorrect; various *nix shell commands are invoked throughout the build process and I *think* I remember some inexplicable crashes even when I hacked through it with MSys (originating from the garbage collector IIRC, so the non-garbage-collection version is an option). Some code modifications *might* be necessary.

Elsa was my second choice. Unfortunately it explicitly DOESN'T compile out-of-the-box on MinGW32 (there is pthreads code throughout, and the build system requires a *nix shell), and it is also designed to be a full C++ parser, which means it carries a lot of extra baggage we don't need that would slow it down. The build system is of course entirely *nix; you need a shell and Perl and there were some weird invocations in the script that were incompatible with MSys (we can't use Cygwin for obvious reasons).

OpenC++ was my third choice, but it also is designed entirely for *nix systems at this point (as nearly as I can tell, because the documentation is poor). I didn't try very hard to get it working.

Parser generators were my last choice, because building a parser by hand is a lot of hard and unrewarding work. Computers and other people DON'T think about C++ the same way you do.

Hope some of that helps. Cheers,
Twilight Dragon
« Last Edit: December 12, 2005, 04:26:51 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

takeshimiya

  • Guest
Re: I'm afraid I don't have much time to work on C::B....
« Reply #11 on: December 12, 2005, 04:58:16 pm »
I ended with your conclussions more or less:

-Synopsis: Great and light parser but not so tested on win32.
-Elsa: Advanced parser based on a parser generator. Doesn't compile on ming32.
-OpenC++: Discarded because is not actively mantained.
-PCCTS 1.33: It was original ANTLR, written in C, not mantained anymore.
-ANTLR C++ 3.1: Almost the best solution, a C++ parser generated from ANTLR. Very actively mantained. Works out-of-the-box on mingw32, MSVC, GCC, etc.
-CodeStore: This is what we need.

So, what is CodeStore? From VCF Builder site:
The C++ parser is based on the ANTLR parser generator project. The C++ grammar is based on the work done by Terrence Parr, Sumana Srinivasan, and Russell Quong in PCCTS, then modified for ANTLR by Jianguo Zuo and David Wigg. I've made a few minor modifications myself as well. This grammar expects pre-processed C++, so I had to find a C pre-processor library. For that I used the ucpp library by Thomas Pornin. I've made some more modifications to this as well, mainly in the form of adding the ability for callbacks to be invoked at various times during the pre-processing.

All of this work is being made into a generic library I call the CodeStore. This is being done so that there exists a usable (hopefully) C++ parser that exists in library form that people can use to deal with parsing C++ and generating an AST from this.


So it's what we need, because it's a library with the purpose of serving to a codecompletion or symbols browser thing.
It's being used in VCF Builder, another open-source IDE, written using VCF, which is an advanced C++ GUI framework (like wxWidgets) which is completely cross-platform.


So far, I've tried to compile CodeStore from Code::Blocks using ming32 and it compiles almost out-of-the-box.
You only need to import the MSVC workspace and it's ready to use.

Here's an screenshoot of CodeStore working on VCF Builder:



So, what do you think?
« Last Edit: December 12, 2005, 05:00:10 pm by Takeshi Miya »

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: I'm afraid I don't have much time to work on C::B....
« Reply #12 on: December 12, 2005, 05:36:38 pm »
Looks good :-)