Saltar al contenido ForoHackers

Linguist who ended up writing parsers

CompiladoresPresentacionesProcesamiento del lenguaje natural
#1071 · polyglot_parser · · Denunciar

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 · · Denunciar

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 · · Denunciar

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.

Inicia sesión o únete para responder.