And this fixes hexadecimal constants. Guile now parses all Sputnik tests for numeric literals. Noah On Tue, Jan 11, 2011 at 5:59 PM, Noah Lavine wrote: > This parses decimal numbers with leading zeros correctly. > > Noah > > On Tue, Jan 11, 2011 at 5:45 PM, Noah Lavine wrote: >> And this fixes an error that came because Unicode 00A0 (no-break >> space) is supposed to be considered whitespace in ECMAScript. >> >> Noah >> >> On Tue, Jan 11, 2011 at 5:33 PM, Noah Lavine wrote: >>> This patch fixes a lot of the "unexpected token: rbrace" errors that >>> had been messing up the Sputnik test results. The issue was that Guile >>> didn't allow functions with empty bodies. >>> >>> Noah >>> >>> On Tue, Jan 11, 2011 at 4:38 PM, Noah Lavine wrote: >>>> Hello, >>>> >>>> The attached patch should add support for ECMAScript unicode literals. >>>> >>>> Noah >>>> >>>> On Tue, Jan 4, 2011 at 4:23 AM, Kan-Ru Chen wrote: >>>>> Hi, >>>>> >>>>> Noah Lavine writes: >>>>> >>>>>> If you mean give guile a '.js' file have it interpret that with >>>>>> ecmascript, then I think it's not possible right now, although I >>>>>> suspect that such a feature could be added easily. >>>>> >>>>> Right, I've cooked a little script to interpret .js files directly. >>>>> >>>>> I ran the sputniktests[1] from google using the attached guile-es-parse >>>>> script, which only tests the parser. >>>>> >>>>>  python tools/sputnik.py --full-summary --command ./guile-es-parse|tee log >>>>> >>>>> The result is impressive (full log attached): >>>>> >>>>>  === Summary === >>>>>   - Ran 5246 tests >>>>>   - Passed 4410 tests (84.1%) >>>>>   - Failed 836 tests (15.9%) >>>>> >>>>> Where the failed tests have >>>>> >>>>>   - 245 unicode errors (unicode literal is not supported) >>>>>   - 393 rbrace errors  (see below) >>>>>   - 39 Math.LN2 errors (see below) >>>>>   - 159 remain to sort out >>>>> >>>>> The rbrace errors are from >>>>> >>>>>   function test() {} >>>>>   // Syntax error: unexpected token :  in form rbrace >>>>> >>>>>   function foo() { this.bar = function() { return 0; } }; >>>>>   // Syntax error: unexpected token :  in form rbrace >>>>> >>>>> I also tried to compile the parsed tests, but halted because too many >>>>> errors like >>>>> >>>>>   Object.prototype.toString = function () {return "something";}; >>>>>   // No applicable method for #< pput (6)> in call (pput >>>>>   // # toString #) >>>>> >>>>> I thought the tests won't run correctly without this. >>>>> >>>>> [1]: https://code.google.com/p/sputniktests/ >>>>> >>>>> Cheers, >>>>> Kanru >>>>> -- >>>>> A badly written book is only a blunder. A bad translation of a good >>>>> book is a crime. >>>>>                -- Gilbert Highet >>>>> >>>> >>> >> >