Using antlr for kdev4

Alexander Dymo dymo at mk.ukrtelecom.ua
Fri Dec 1 11:44:42 UTC 2006


On Friday 01 December 2006 13:15, Andreas Pakulat wrote:
> > I also assume that you've looked at using KDevelop-PG as well. Although
> > Jakob says he's argued against it, I don't recall the conversation.
>
> The biggest problem with kdev-pg is, that the AST it generates doesn't
> allow for modifications, which means I'd have to think about other ways
> to change the project file. If I understood adymo correctly he mentioned
> that we could use the AST to get the proper position where to insert a
> new variable (or anything else) and then insert directly into the file.
> This would of course mean having to reparse on every change to a file
> and possibly also reparse the subprojects...

Well, I don't think that's going to be easier with Antlr. Yes, you can create
more customized AST in Antlr (to make ast smaller and add "write back"
methods), but I guess  the same thing could be achieved with custom 
kdev-pg ast tree walker.
So if you're deciding against flex/bison, I'd still recommend kdev-pg.




More information about the KDevelop-devel mailing list