On Thu, Aug 07, 2008 at 05:04:41AM -0500, John M. Dlugosz wrote: > What about adverbs on reduction operators? > > [lt :lc] $a,$b,$c # all in decreasing order
I don't think that'll fly because reduce operators are parsed as single tokens to disambiguate them from array composers, and there are already 7000 reduce operators. Currently every basic infix operator adds 88 different possible reduce operators. (We could cut that down somewhat if we removed Texas quotes from the language.) But adding in all possible adverbs will just completely blow the lexer out of the water. Or to put it another way, how should we parse something like your example after someone adds "sub lt" without resorting to arbitrarily complex backtracking? The only other way I see to distinguish is to require all array composers to contain a space, since reduce operators may not. But I think that's kinda tacky, and your example still would not work unless you changed it to [lt:lc]. There comes a point at which it's just better to force the user to say: my &infix:<lt_lc> ::= &infix:<lt>.assuming(:lc); [lt_lc] $a, $b, $c; Larry