On 1/3/13, David A. Wheeler <dwhee...@dwheeler.com> wrote: > The current draft BNF in sweet.g has an interesting difference from our > current sweet-guile implementation in an edge case, involving the sequence > initial-$ EOL INDENT. Any thoughts on the "best" semantic? > > In testing, I fed the sweet.g implementation this sequence: > $ > \> d e > \< > > That is just a stub representation of: > $ > ! a b > > but what, exactly, should that *mean*? The ANTLR implementation, driven by > the BNF, interprets that as (((d e))). This is different from the current > "unsweeten", which gives ((d e)). > > Frankly, I think the ANTLR BNF is "more right" in this case. After all, if > you meant ((d e)), the more obvious way to write that using indentation > would be: > \\ > ! d e > Since leading "$" forces an additional list in general, a leading "$" with > an immediate blank line after it should force an *additional* list, which is > what the BNF does. > > It's a pretty odd case; I suspect we could forbid "intiial-$ EOL INDENT" > without many noticing. But it does follow from having "as consistent rules > as possible", and I *do* like consistency as much as we can manage. So I'm > inclined to let the ANTLR BNF stand in this case. > > We don't need to fix unsweeten at the moment, if this is indeed an error; > once the BNF is fixed I intend to rewrite the indentation parser which would > fix that anyway. > > Any thoughts?
Sounds fine to leave it at (((d e))) to me. I don't see much use for ^[ !\t]*$$ either. Sincerely, AmkG ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss