Guidance on developing a new language plugin

Milian Wolff mail at milianw.de
Mon Feb 22 12:43:16 UTC 2010


Victor Vicente de Carvalho, 21.02.2010:
> Hi all,
> 
> I'm trying to implement an erlang plugin for kdevelop. I've mailed milian
> sometime ago, and was sucessfull creating the lexer and the sintatic
> parser, but I'm having some trouble integrating the DUchain stuff. In my
> point of view, as a dynamic, functional language, little information is
> needed, so I'm wondering what of DUchain should I use, if none. I'm trying
> to study it on pgp and css plugins, wich I've found to be more alike
> erlang
> functionalities, but I'm confused about the builders. What exactly are the
> ContextBuilder and DeclarationBuilder? I just wanted to make comon errors
> to show, and an simple include system; In my point of view that should be
> the necessary. In some late point, if everything runs well, I'll discuss
> on how to integrate the dialyzer program, witch detects variable types,
> abd so doing the semantic part (in ways of "meaning of a type").

You need the builders as soon as you want more than simple parse-error 
reporting. Especially things like quickopen, outline, classbrowser, ... 
require declarations in the DUChain. And imo, if you already have a parser, 
adding the builders should be a piece of cake :) Please push your code to 
playground/devtools/kdevelop4-extra-plugins so we/I can have a look at it.

> In attachment I'm posting some changes I've made on kdevelop-pg-qt. The
> firs is that error generation was using qDebug(), wich prints newlines
> after every stream outputted, and the other is to really print the content
> of the nodes, because actually the FIRST/FOLLOW, FIRST/FIRST problems are
> outputting the integer pointer of the node. To understand, just run it on
> a grammar witch has erros.

Please remove the indentation changes from the patch, this way I cannot really 
review the changes.
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100222/12b554cd/attachment.sig>


More information about the KDevelop-devel mailing list