Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Parser combinators in C (github.com/wbhart)
12 points by wbhart on June 3, 2012 | hide | past | favorite | 2 comments



I found have boost::spirit to be a fascinating view of parser combinators in C++. It produces extremely fast parsers, but for large parsers can take over 15 minutes, and 4GB of RAM, to compile (from personal experience).

I haven't quite decided my final opinion on boost::spirit. I often use it for tiny hacky things, but have generally stopped using it for really big parsers.


I'm totally guessing, but perhaps there is no way to memoise when using preprocessor magic and so the algorithm for constructing the parser is O(n^2). (Of course my parser combinators don't memoise either.)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: