I pondered this discussion the other day and had some more thoughts. > > How about a 'foreach' construct? So one could write > > > > sum(foreach //item return quantity * USPrice) > > > > Shouldn't that avoid any parsingproblems? > > > Unfortunately not. It requires either lookahead or reserved words: you can't > tell until you hit the "return" that foreach//item isn't a relative path > expression. shouldn't this work: for each //item return quantity * USPrice I am admittedly not very well versed in lexers/parsers, but it seems like if a lexer is able to tokenize "cast as" without lookahead, then it should be able to interpret "for each" as well? / Jonas SickingReceived on Monday, 18 March 2002 08:00:56 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:54 GMT