4 ms·
For me the interesting part was a cliff hanger:). How exactly a context free parser and lexer help in specification? Do such cases exist? If not why? Also why
by ptsneves 7y ago
For me the interesting part was a cliff hanger:). How exactly a context free parser and lexer help in specification? Do such cases exist? If not why? Also why have I never heard of context free programing languages? I am trying to think of file formats and even a puny ini file has a context aware parser.
Do not get me wrong with all these questions. I never heard of this topic before so I am very curious and grateful for the HN post.
- ben509 7y agoI think it helps with tooling, linters, refactoring tools, code generation, etc., if you have a "standard" lexer and parser. The reason being these tools can rely on reasonably standard parsing libraries to take a spec in a common format and then translate input to an AST to take actions on. If you haven't heard the term context-free, you haven't done much parsing; it's ubiquitous there.