From: Tony Arcieri Date: 2009-05-22T08:20:26+09:00 Subject: Re: Pythonic indentation (or: beating a dead horse) --0016e64652e26e6eec046a746360 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, May 21, 2009 at 4:29 PM, Ryan Davis wrote: > To be fair, if you looked at ruby's lexer and parser you'd know that we're > already down a rabbit hole. Oh yes, things like Ruby's lexer/parser feedback involved in interpolated strings makes my eyes bleed. That's sure begging for a PEG. That said, as messy as lexer/parser feedback is we're talking about something worse here: including grammatical knowledge in the scanner which cannot be expressed as a CFG at all. As bad as Ruby already is, the solution is even messier than anything which already exists. It would involve some ad hoc grammatical analysis by the lexer for the purposes of having a pushdown deeper in the stack terminate one which is higher up by sneakily injecting "end" tokens. Aiee! -- Tony Arcieri medioh.com --0016e64652e26e6eec046a746360--