Beni Cherniavsky-Paskin: > > This behaves surprisingly: > > > > $ > > ! a b > > ! c d > > ==> > > ((a b (c d))) > > > > it seems $ consumes the following newline, resulting in same parsing as if I > > wrote > > > > $ a b > > c d > > > > Is this deliberate?

Alan Manuel Gloria > No (at least not by me; check David's answer, but I suspect he didn't > implement it deliberately that way). Alan's right, that's unintentional in the Scheme implementation. The BNF does not permit this construct at all, so the ANTLR implementation will give an error in this case. The relevant production is it_expr, which permits only: | SUBLIST hspace* is_i=it_expr {$v=list($is_i.v);} /* "$" first on line */ That is, "$", after any hspaces, MUST be followed with an it_expr, and CANNOT be followed currently by ";" or an end-of-line marker. > Every example we have has some > other datum after the "$", I never said anything about $-at-eol ever > since I first proposed SUBLIST on the mailinglist, and so on, so you > might legitimately say that this is "unspecified". > > > Since "a b" is on a child line, I'd it to parse in the same manner as "c d", > > resulting in ((a b) (c d)). > > That seems reasonable, given your rules. One might say that: > > $ > ! a b > ! c d > ==> > $ \\ > ! a b > ! c d I'm okay with that, especially if it makes using the construct "more natural" and avoids turning a plausible use into an error. It's a trivial 1-line addition to the BNF. If we *don't* add that, then I clearly need to add an error-check to the Scheme implementation. > > [I'm asking this because if it's 'fixed, my > > closing-SUBLIST-by-unmatched-dedent would allow: > > > > let $ > > ! ! x $ compute 'x > > ! ! y $ compute 'y > > ! body... > > ] I have a *lot* of concerns with that particular construct. But we could certainly allow $-at-end-of-line regardless, on the grounds of consistency. So let's add $-at-EOL, unless someone objects soon. --- David A. Wheeler ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss