Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lexer/parser tools [closed]

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?

like image 206
Zifre Avatar asked Mar 30 '09 14:03

Zifre


1 Answers

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:

  • Packrat
  • Elkhound
  • Antlr
  • Spirit part of Boost (C++)
  • Lemon
  • GOLD Parser
  • DMS Software Rengineering Toolkit (not FOSS)

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.

like image 196
dajobe Avatar answered Sep 27 '22 21:09

dajobe