3 ms·
The concept of "inverse parentheses" that unbundle operators is brilliant! The tokenizer hack (friendliness score by parenthesis depth, inspired by Python INDEN
by HansP958 10mo ago
The concept of "inverse parentheses" that unbundle operators is brilliant! The tokenizer hack (friendliness score by parenthesis depth, inspired by Python INDENT/DEDENT) + precedence climbing for infinite levels is elegant – parsing solved without convoluted recursive grammar.
kellett
I love the twist: reversing the friendly levels gives you a classic parser, and it opens up crazy experiments like whitespace weakening. Have you tested it on non-arithmetic ops (logical/bitwise) or more complex expressions like ((()))?
- istjohn 10mo agoIt's not just brilliant, it's earth-shattering.
- codegladiator 10mo agollm generated comment
- NetMageSCW 10mo agoI am sure your comment is almost always wrong whenever you use it.