I'm proposing a minor grammar change, and want to know of any objections. Currently, in sweet-expressions, if a line has more than one neoteric-expression and the last expression is ".", the "." is interpreted as the symbol whose spelling is the single character ".". E.G.: quote . => (quote |.|)
I propose making this an error instead, to improve error detection. It's fairly unusual to want this on *purpose*. Usually "." introduces the cdr of a pair. This would detect accidental use, if you *wanted* to do this, you'd then have to escape it - say like this: quote |.| => (quote |.|) The grammar change is trivial, and makes the grammar simpler. In ANTLR/Java: rest returns [Object v] - : PERIOD /* Improper list */ - (hspace+ pp=post_period {$v = $pp.v;} - | /*empty*/ {$v = list(".");}) + : PERIOD hspace+ pp=post_period {$v = $pp.v;} /* Improper list */ A period on a line by *itself* would continue to mean that the next line (at the same indent level) is the cdr of the given list. Any objections? I plan to check this into the development branch, so we can experiment with it, but it'll be easy to pull out if there are objections. --- David A. Wheeler ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss