"\08" is ill formed in ECMA262

Yusuke SUZUKI utatane.tea at gmail.com
Sat Jun 8 10:01:19 PDT 2013

Hello all,

Seeing ECMA262 section 7.8.4,

EscapeSequence ::
>     CharacterEscapeSequence
>     0 [lookahead ∉ DecimalDigit]
>     HexEscapeSequence
>     UnicodeEscapeSequence

Because of "[lookahead ∉ DecimalDigit]", strictly speaking, "\08" / "\09"
is ill formed StringLiteral.
But engines in the wild, V8, SpiderMonkey, JSC accepts this form and
recognize it as "\x008".

To bridege the gap, I think it is better to introduce this form to the spec

Yusuke Suzuki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130609/e45a0470/attachment.html>

More information about the es-discuss mailing list