From: Stephen W. <sw...@in...> - 2001-10-04 21:13:04
|
Andreas: > During compiling this I also made a bunch of contrived test files to > see how implementations cope with some of the more obscure details of > the > Definition (i.e. those that are tedious to implement or are pretty > counter-intuitive, as noted in the list). Here is a table of the results > (I hope Netscape does not gargle it): ... Three of your test cases tickled another obscure part of the Definition (to me anyway), and I suspect it was unintentional on your part. The tests "asterisk", "semicolon", and "typespec" contained the '\r' character (ascii decimal 13). Quoting from the Definition: Section 2.5: Comments and formatting characters separate items (except with string constants; see Section 2.2) and are otherwise ignored. Section 2.2: The formatting characters are a subset of the non-printable characters including at least space, tab, newline, formfeed. Since carriage return is not required to be a formatting character, I believe that it is acceptable for an implementation to reject programs containing carriage returns, although it is also allowable to accept them. At present, MLton rejects them. I would be happy for clarification. BTW, as an implementor, I really appreciate having examples like this to clarify things. Thanks for making them. I think that a set of well-constructed examples is as essential as the Definition in making different implementations consistent. I would like to see more cases like these, and for all proposed language extensions to come along with such a set of test cases. |