Back to Blog home

LALR(1) and Trolltech’s Creative Fridays

Published on Friday March 09, 2007 by Matthias Ettrich in Compilers Labs Qt News QLALR | Comments

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.

Subscribe to Our Blog

Stay up to date with the latest marketing, sales and service tips and news.

We are updating our comment system and you could face some issues. Please write to us at to report issues/bugs.