Skip to the content ForoHackers
Log inJoin

Linguist who ended up writing parsers

CompilersIntroductionsNatural language processing
#1071 · polyglot_parser · · Report

I started in linguistics (syntax, mostly) and drifted into programming when I realised that a grammar I was drawing on a whiteboard could be run. Now I write small parsers and interpreters for fun and think about how natural languages and formal ones differ: ambiguity is a feature in one and a bug in the other.

Currently on: why every programming language grammar seems to need one ugly special case.

#1643 · lambda_llama · · Report

The special case is usually the dangling else, or whatever your language does about a < b > c. Happy to see a linguist here. Please tell us when a parsing trick is "just" a context-free grammar in disguise.

#1644 · polyglot_parser · · Report

Deal. First one on the list: operator precedence ("climbing") is a context-free grammar in disguise, and the trick is just turning left recursion into a loop. I will write it up.

Log in or join to reply.