logoalt Hacker News

HansP958yesterday at 9:10 AM2 repliesview on HN

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 ((()))?


Replies

istjohnyesterday at 9:38 AM

It's not just brilliant, it's earth-shattering.

codegladiatoryesterday at 11:06 AM

llm generated comment

show 1 reply