Context-Free Grammars

The cluster focuses on debates about context-free versus context-sensitive grammars for parsing programming languages, handling ambiguities, lexer-parser interactions, and tools like BNF, ABNF, and parser generators.

📉 Falling 0.4x Programming Languages
2,789
Comments
20
Years Active
5
Top Authors
#5227
Topic ID

Activity Over Time

2007
4
2008
8
2009
33
2010
79
2011
82
2012
57
2013
127
2014
129
2015
157
2016
178
2017
202
2018
148
2019
171
2020
251
2021
161
2022
237
2023
286
2024
260
2025
203
2026
16

Keywords

LR OK P6 IDE harvard.edu n.b GLR BNF BCE EBNF grammar context parser parsing language free break ambiguity sensitive syntax

Sample Comments

thedonald123 Jul 25, 2015 View on HN

What do you lose by sticking to context-free grammars?

mannykannot Apr 19, 2021 View on HN

It's a context-sensitive grammar (OK, not strictly...)

amelius May 26, 2015 View on HN

What class of grammars does this support? How are ambiguities handled and reported?

choeger Oct 20, 2023 View on HN

Please, please, please, make sure that it uses a context-free grammar. For the live of Knuth, correct that one stupid mistake he made and allow other people to parse your syntax. Good things will follow!

nly May 7, 2016 View on HN

Many inputs don't have well-specified grammars.

rad_gruchalski Jun 8, 2021 View on HN

It's a language for a reason, there's a grammar, parser, lexer, ast. What's the problem?

banish-m4 May 12, 2024 View on HN

Read up on context sensitive grammars.

substack Mar 16, 2011 View on HN

Isn't this what perl6 grammars set out to solve?

astrange May 1, 2023 View on HN

English isn't a context-free grammar so that wouldn't help.

UK-AL Aug 15, 2017 View on HN

You can't do those things using a parser generator. They not a part of the grammar.