On 23 Feb 2015, at 14:37, [email protected] wrote:
> {{{
> An integer constant (in decimal notation) is an optional negation symbol
> (~) followed by a non-empty sequence of decimal digits 0,.., 9. An integer
> constant (in hexadecimal notation) is an optional negation symbol followed by
> 0x followed by a non-empty sequence of hexadecimal digits 0,.., 9 and a,..,
> f. (A,..,F may be used as alternatives for a,.., f.)
> A word constant (in decimal notation) is 0w followed by a non-empty
> sequence of decimal digits. A word constant (in hexadecimal notation) is 0wx
> followed by a non-empty sequence of hexadecimal digits.
> }}}
> Source: Milner R., et al. "The Definition of Standard ML. Revised." MIT (1997)
> Thus "0xw9" is invalid.
Your quotation makes it clear that “0xw9” isn’t a valid word constant. But your
quotation does not forbid it being lexed as two lexemes: the integer constant 0
followed by the identifier xw9. See Matthew Fluet’s post.
Regards,
Rob.
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml