Using antlr for kdev4
apaku at gmx.de
Fri Dec 1 00:01:25 UTC 2006
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
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?
You will have a long and unpleasant discussion with your supervisor.
More information about the KDevelop-devel