HACKER Q&A
📣 ColinWright

What parser would you choose?


It's been a long time since I used bison, and there are now a lot of other options around now.

I'm going to be parsing some text ... think lightly structured natural language ... and I'd be interested to know what the HN community would recommend, and dis-recommend.

There are things like ANTLR, Lemon, and this page[0] has too many to mention.

So, does anyone here have anything to suggest?

TIA.

[0] https://wiki.python.org/moin/LanguageParsing


  👤 richardjam73 Accepted Answer ✓
It really depends on what you are parsing. Currently I'm writing a text adventure in FSharp and I've decided to just use a tokeniser/parser that I wrote instead of one of the bigger libraries like FParsec. When I was writing a compiler in Python the other year, I went through several different parsers but in the end I preferred Arpeggio.

👤 gjvc
PLY or SLY by David Beazley