KDevelop-PG Qt

November 25, 2007 at 2:28 am | Posted in KDevelop | 2 Comments

The last two days I’ve spent hacking on KDevelop-PG, the parser generator originally written by Roberto Raggi and used for forthcoming QMake, Python and Ruby support in KDevelop4.

There are basically two changes I’ve done, change from STL like class and method names to Qt-ish and change the container classes and similar things to use Qt classes – both for the kdevelop-pg code and the code it generates for your gramar. Most important reasoning for this is maintainability by those people that currently use KDevelop-PG, which is Alexander Dymo and myself. I guess its not that big a problem for Alexander, but I often have a hard time really understanding how STL works – mostly due to me not yet spending any time for an in-depth review.

As introducing Qt as a dependecy for kdevelop-pg as well as the generated parsers is a step not every possible user of kdevelop-pg wants to take we’ve essentially forked the parser generator, creatind KDevelop-PG-Qt. So anybody who wants to have a good LL(1) parser generator (with static and also kind of dynamic lookahead for k>1) without the heavy Qt library can still use kdevelop-pg.

The work was tedious, but not too hard, especially with KDevelop3 project wide search and search+replace :) I’ve also already changed the python parser to the new KDevelop-PG-Qt, though the rest of its language support will have to wait until the hand-crafted Ast is done.

My next todo item for KDevelop-PG-Qt is making it bootstrap itself, possibly including a hand-written lexer to be able to read unicode input properly – just in case anybody wants that :)

Blog at WordPress.com. | The Pool Theme.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.