Lexer/parser tools

Zifre picture Zifre · Mar 30, 2009 · Viewed 8.9k times · Source

Which lexer/parser generator is the best (easiest to use, fastest) for C or C++? I'm using flex and bison right now, but bison only handles LALR(1) grammars. The language I'm parsing doesn't really need unlimited lookahead, but unlimited lookahead would make parsing a lot easier. Should I try Antlr? Coco/R? Elkhound? Something else?

Answer

dajobe picture dajobe · Sep 24, 2009

Updated 2015-01-05:

My original answer pointing to a now deleted question:

There are a bunch of good answers to this question already in What parser generator do you recommend

So I've taken the list of items from the deleted answer on archive.org with at least 1 vote here:

I've done several flex/bison systems myself but now I'd replace both with Lemon from sqlite since it's one tool, re-entrant and thread safe as well as having a streaming/pull-based model.