Using antlr for kdev4

Matt Rogers mattr at
Fri Dec 1 03:20:31 UTC 2006

Andreas Pakulat wrote:
> Hi,
> as my first attempts with Flex/Bison for the qmake parser in KDevelop4
> weren't very successfull I had a look at antlr.
> Writing a Parser and Lexer for variable assignments was pretty easy with
> antlr and the syntax to write the lexer and parser suits me better than
> the one of bison. Especially being able to use *,? and co within parser
> rules (or does bison allow for that? I did not read its huge manual, so
> I might not know yet).
> My first simple grammar couldn't build a AST, due to a segfault
> somewhere in the generated code. But we do get C++ classes for the Lexer
> and the Parser which allows to easily parse parts of a qmake project
> file.
> I also see that kdevelop3 used antlr for some of its language supports,
> so I am asking what the optinions of the other kdev4 developers are
> about using antlr for the qmake parser?
> Andreas

Don't we already have a QMake parser in KDevelop 3.4? What's wrong with 
using and adapting that?

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.

I'm totally for using the best tool for the job, but the amount of 
dependencies KDevelop has/will have is starting to bug me a bit. Are you 
planning on eliminating the need to use antlr at build time?


More information about the KDevelop-devel mailing list