Parsers don't have to be complicated
- Programming
- Developer Tools
- Standards
- Security
The post is a practical case for hand-written parsers. It shows a small scanner abstraction in C++ and uses it to parse simple text formats, with the broader claim that you do not need parser generators or elaborate theory for a lot of day-to-day work. That landed with plenty of sympathy. People generally agreed that for small formats under your control, direct parsing code is often easier to read, easier to debug, and fast enough that asymptotic performance is rarely the thing that hurts you.
If you are parsing a narrow, controlled format, a hand-written scanner is often the fastest path to something understandable and maintainable. If the input is internet-facing, spec-heavy, or user-authored, budget early for hostile inputs, diagnostics, and compliance work because that is where parser complexity actually comes from.
-
bkaradzic.github.io
- Discuss on HN