[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Scheme r7rs syntax described by ABNF

On Sat, Jan 19, 2013 at 01:36:53AM +0900, ノートン ジョーセフ ウェイ ン wrote:
> Alex -
> I added the following TODO item to my local copy and also added one new item as a placeholder.
> ;;;
> ;;; TODO:
> ;;;   - Fix definition of peculiar-identifier and
> ;;;     pattern-peculiar-identifier not to include "+i", "-i", and
> ;;;     <infnan>.

Most Schemes tend to attempt a numeric parse of a datum and if it fails
fall back to assuming it must be a symbol.  This isn't required by the
standard, so you're right, the identifier definition should disallow

> ;;;   - Review definitions to check if syntactically correct but
> ;;;     semantically incorrect numbers can be avoided (e.g. "#e0/0",
> ;;;     "#e+1/0", "#e-1/0", "#e"<infnan>).

I think this was discussed before.  In any case, IMHO these numbers
should not cause a hard read-time parse error but some sort of runtime
or compile-time error upon conversion to an internal numeric

I'm not sure the standard should forbid a read-time parse error, but I
think it shouldn't try to enforce semantic rules at the syntactic level.


Scheme-reports mailing list