my favourite* thing about the Ruby parser is how the lexer state changes in a very complex context sensitive way based on which parse node you're in. * I actually hate it
-
-
search for SET_LEX_STATE https://github.com/ruby/ruby/blob/v2_5_5/parse.y …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Ruby just fundamentally isn’t context-free, yet we keep trying to use context-free tools to parse it.
-
my gut feeling is that the context-sensitivity is a bit unnecessary. I understand that the exact parsing rules are tricky to express in CFG, but is it really that critical that foo / 1 #/ is parsed differently depending on whether foo is a local variable or not?
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.