archives

« Bugzilla Issues Index

#215 — 15.9.5.43-0-4.js has SyntaxError in ECMA262 5.1 grammer


Created attachment 4
patch for 15.9.5.43-0-4.js

chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-4.js has SyntaxError in ECMA262 5.1 grammer.

The point at issue is NumericLiteral `09`.

This is not OctalIntegerLiteral because 9 is not OctalDigit.
OctalIntegerLiteral ::
0 OctalDigit
OctalIntegerLiteral OctalDigit

http://es5.github.com/#B.1.1

And, at the same time, this is not DecimalIntegerLiteral.

DecimalIntegerLiteral ::
0
NonZeroDigit DecimalDigitsopt

http://es5.github.com/#x7.8.3

so, parser should reduce it as 0 and 9.
And because of "The source character immediately following a NumericLiteral must not be an IdentifierStart or DecimalDigit.", this should be treated as SyntaxError.
(section 7.8.3 NOTE)


Created attachment 5
new test case for this issue

And I suggests adding new testcase for it.
This testcase file format may be invalid... sorry.


Thank you Yusuke! Very good spot, and I'll fix it shortly.


Checked into Hg.