PDA

View Full Version : What parser generator would you recommend for compatibility with Qt and MingW



feraudyh
29th April 2010, 11:04
Hi,
I'm looking for a parser generator that generates C++ code that will require minimal modification for Qt and the MingW g++
compiler. Actually for the time being I'm just interested in Lexical Analysis.
I'm aware of the existence of Bison, Flex and Golden Parser and Antlr.
The trouble with the Golden Parser as I see it is that its engine is targeted to Visual C++.
I was not quite sure which forum to post this in, so forgive me if I made a mistake.

thank you for your attention
Henri

NoRulez
29th April 2010, 11:16
You could try QLALR
qlalr-adventures (http://qt.nokia.com/developer/qtquarterly/qlalr-adventures)
qlalr (http://labs.trolltech.com/blogs/category/labs/compilers/qlalr/)

Best Regards
NoRulez

wysota
29th April 2010, 13:52
"Lexical analysis" is about "lexems", so tools like flex are more suited for the subject. Of course unless you meant "semantical analysis" or "grammar analysis".

feraudyh
30th April 2010, 07:22
Yes, you are right to insist. I actually meant both lexical analysis and parsing.
Does QLALR have a flex equivalent or is Flex quite sufficient in fact?

wysota
30th April 2010, 07:26
QLalr doesn't enforce any lexer, you can use whichever you like or write your own.

TorAn
1st May 2010, 14:40
Take a look at boost Spirit 2.x

SixDegrees
1st May 2010, 15:06
Note that boost has significant portability issues. It will work with recent versions of GCC and (I think) VS, but it strains most other compilers well beyond their limits. This may be a problem if, for example, you need to build using the native Solaris compiler for some reason.