<korvo>
I guess I should set up a repo for this somewhere.
<korvo>
Unlike #18/#79, my change is fairly surgical; I add a stack as an instance variable to the lexer, and I add two new hooks for rules. One hook checks the stack and the other hook modifies it. This is roughly what Flex does, with the corresponding crash-on-underflow semantics we "love" and "expect".
<korvo>
But given all that, parsing Nix's string QLs was straightforward. Each QL comes apart into pieces, there's only three possible pieces to lex, and each piece checks/modifies the stack. Plain expressions also push and pop the stack. The nasty examples from earlier all parse.
jcea has quit [Ping timeout: 240 seconds]
itamarst has quit [Quit: Connection closed for inactivity]