LALR(1) and Trolltech’s Creative Fridays

Published Friday March 9th, 2007
1 Comment on LALR(1) and Trolltech’s Creative Fridays
Posted in Compilers, Labs, News, QLALR, Qt

If you followed, you’ve seen a new addition: QLALR. It’s a LALR(1) parser generator, created by Roberto Raggi of Qt Designer and KDevelop fame. Originally developed as Creative Friday project, it quickly got used in various projects within Trolltech. One example is the new script engine – no surprise, Roberto also had his fingers in this one – but also the new XML stream-reader. Writing a fast bottom-up XML parser was a welcome challenge, and with the flexibility of QLALR actually an enjoyable ride.

QLALR is not very well documented, but if you do understand LALR(1) and have used tools like yacc before, you should get along well with the examples. Admittingly, knowing Roberto has also helped. For the lexer, you can use QLALR with whatever scanner generator you like, or you handcraft it. I’ve also seen a few scanner generators in Trolltech, maybe one will make it on labs some day.

Btw, the last link demonstrates another new feature of our web site: we finally have the snapshot documentation online, regenerated from the source code repository daily.

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Compilers, Labs, News, QLALR, Qt

One comment

Erik says:

Ah, that’s one point (besides e.g. flexible command line parsing) I was always missing with Qt. Good work and keep pushing!


Commenting closed.

Get started today with Qt Download now