You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, there's 300 grammars around just here to "study at length" which is exactly what I want to ruthlessly cut down on, to actually Get Stuff Done For Once. 😁
Does anyone know a language among the many mentioned above (or elsewhere, simple minimal .g4) that is indent+line-based such that indented lines (of whatever tokens) become a block/list of "sub-nodes" of the "parent node" (previous dedented line), recursively? Some config language I guess (might keep it simple without the extra prog-lang complexities). Still context-free, unlike YAML (which understandably is not among the ~300 existing grammars — neither is CoffeeScript, the third indent-based lang I know of).
And ideally without needing custom lexing code hacked together in Java/Python/C#/etc...
I can't believe the most common textual representation humans choose to reflect a simple tree cannot be smoothly expressed in the likes of BNF, eBNF or ANTLR's very similar (and otherwise very cool) dialect after all these decades — I and my search-engine searches must be something?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Now, there's 300 grammars around just here to "study at length" which is exactly what I want to ruthlessly cut down on, to actually Get Stuff Done For Once. 😁
Does anyone know a language among the many mentioned above (or elsewhere, simple minimal
.g4
) that is indent+line-based such that indented lines (of whatever tokens) become a block/list of "sub-nodes" of the "parent node" (previous dedented line), recursively? Some config language I guess (might keep it simple without the extra prog-lang complexities). Still context-free, unlike YAML (which understandably is not among the ~300 existing grammars — neither is CoffeeScript, the third indent-based lang I know of).And ideally without needing custom lexing code hacked together in Java/Python/C#/etc...
I can't believe the most common textual representation humans choose to reflect a simple tree cannot be smoothly expressed in the likes of BNF, eBNF or ANTLR's very similar (and otherwise very cool) dialect after all these decades — I and my search-engine searches must be something?
Beta Was this translation helpful? Give feedback.
All reactions