Guidance on developing a new language plugin

Milian Wolff mail at milianw.de
Wed Feb 24 10:05:08 UTC 2010


Victor Vicente de Carvalho, 24.02.2010:
> 2010/2/22 Milian Wolff <mail at milianw.de>
> > 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.

> Hi Milian,
> 
> In attachment I'm sending 2 diffs: the first with the changes I've
> mentinoned not touching identation

I guess this part of the patch is ok, looks good to me. But how did you 
generate the patch, since it's in the wrong order (open it with kompare)? You 
should simply svn checkout and then svn diff -u.

In the while -> for loop change the indentation is not correct, also you can 
simply pass *it to printer() and don't need the n variable at all. 

Other than that it looks good, you can commit.

> and the second changing as little as
> possible on code, with implies on doing some ghost flush's (and an uglier
> output :).

I guess the -ugly patch simply prints the content of the nodes? Why is the 
flushing required there, please explain.

PS: Please don't top post ;-)
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-- 
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/20100224/07632986/attachment.sig>


More information about the KDevelop-devel mailing list