Using antlr for kdev4

Alexander Dymo dymo at mk.ukrtelecom.ua
Fri Dec 1 17:21:03 UTC 2006


On Friday 01 December 2006 14:16, Andreas Pakulat wrote:
> > 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.
>
> Hmm, so I would parse a file, run a tree-walker over the AST and then
> create another AST out of that? As I may end up doing pretty much the
> same thing in antlr, I think you have a point here.

Yes, and you would probably want to have the same (or similar) AST you get
from current bison parser then. Current AST produced by bison parser is 
quite succinct so you could produce it instead of using kdev-pg 
autogenerated one. This will also save your time porting the existing code.

This would mean adding another level of indirection that did not 
exist in bison parser though...




More information about the KDevelop-devel mailing list