From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: Sputnik test result (was Re: ECMAScript support broken?) Date: Tue, 11 Jan 2011 17:59:47 -0500 Message-ID: References: <87ei8vxngp.fsf@anar.kanru.info> <87hbdqml9c.fsf@anar.kanru.info> <87aajhkooc.fsf_-_@anar.kanru.info> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=00504502c86885c6ef04999a0aea X-Trace: dough.gmane.org 1294786810 10601 80.91.229.12 (11 Jan 2011 23:00:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Jan 2011 23:00:10 +0000 (UTC) Cc: guile-devel@gnu.org To: Kan-Ru Chen Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 12 00:00:05 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PcnC6-0002ZQ-8c for guile-devel@m.gmane.org; Wed, 12 Jan 2011 00:00:02 +0100 Original-Received: from localhost ([127.0.0.1]:46870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcnC5-0003dD-O0 for guile-devel@m.gmane.org; Tue, 11 Jan 2011 18:00:01 -0500 Original-Received: from [140.186.70.92] (port=33147 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcnBx-0003cc-SW for guile-devel@gnu.org; Tue, 11 Jan 2011 17:59:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcnBs-0006RU-MU for guile-devel@gnu.org; Tue, 11 Jan 2011 17:59:53 -0500 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:50153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcnBs-0006RG-8q for guile-devel@gnu.org; Tue, 11 Jan 2011 17:59:48 -0500 Original-Received: by wyj26 with SMTP id 26so21924829wyj.0 for ; Tue, 11 Jan 2011 14:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=NkAZOZDrV7r0SsjVSnCIhSW0luwV04+7ZJAkbP0o8K4=; b=Mu5ZtdjmsrApb1T9gmHEpNHkC5CyIAa0zU0xk1yY6lQkQIXzRn52FS4o5B5kx4k8+p IhLhPAJZA53CFEXERT37Jy/OdXe4vwyo2hgsEZjvJom0VPDq8lfjAekNgPq1PZfpROG4 lDnarZlN2/avnSBTBwkmzsCV5gxSo2p0NeZVo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=BITTXkKLVLcIllJbDJ0RY7nlVEYTWrcLCPF3pb+JnHxUr09BoJDTHHol3d1DO7KTa5 L2c5xcWQSRq/OlJHewfwa5OF5kUFByasO6Ba037EhzHEhRWngtlHvJzDSIxmBjwBfxvG w1vDesvdPRZd7T0aljqprzy8WMginUCIUtqLw= Original-Received: by 10.216.71.13 with SMTP id q13mr188011wed.21.1294786787395; Tue, 11 Jan 2011 14:59:47 -0800 (PST) Original-Received: by 10.216.156.65 with HTTP; Tue, 11 Jan 2011 14:59:47 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: MZgUGCsISSH7LBHsQ8dvxfDdldU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11310 Archived-At: --00504502c86885c6ef04999a0aea Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This parses decimal numbers with leading zeros correctly. Noah On Tue, Jan 11, 2011 at 5:45 PM, Noah Lavine wrot= e: > 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 wr= ote: >> 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 w= rote: >>> 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-pars= e >>>> script, which only tests the parser. >>>> >>>> =A0python tools/sputnik.py --full-summary --command ./guile-es-parse|t= ee log >>>> >>>> The result is impressive (full log attached): >>>> >>>> =A0=3D=3D=3D Summary =3D=3D=3D >>>> =A0 - Ran 5246 tests >>>> =A0 - Passed 4410 tests (84.1%) >>>> =A0 - Failed 836 tests (15.9%) >>>> >>>> Where the failed tests have >>>> >>>> =A0 - 245 unicode errors (unicode literal is not supported) >>>> =A0 - 393 rbrace errors =A0(see below) >>>> =A0 - 39 Math.LN2 errors (see below) >>>> =A0 - 159 remain to sort out >>>> >>>> The rbrace errors are from >>>> >>>> =A0 function test() {} >>>> =A0 // Syntax error: unexpected token : =A0in form rbrace >>>> >>>> =A0 function foo() { this.bar =3D function() { return 0; } }; >>>> =A0 // Syntax error: unexpected token : =A0in form rbrace >>>> >>>> I also tried to compile the parsed tests, but halted because too many >>>> errors like >>>> >>>> =A0 Object.prototype.toString =3D function () {return "something";}; >>>> =A0 // No applicable method for #< pput (6)> in call (pput >>>> =A0 // # 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. >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Gilbert Highet >>>> >>> >> > --00504502c86885c6ef04999a0aea Content-Type: application/octet-stream; name="0001-Parse-Decimal-Numbers.patch" Content-Disposition: attachment; filename="0001-Parse-Decimal-Numbers.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gitem7r61 RnJvbSAzZGU4NTlhMzMzNzk1YzUxMjJmYzUxZmQxYjBkMmU3MWViZmM5ODFkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOb2FoIExhdmluZSA8bmxhdmluZUBoYXZlcmZvcmQuZWR1PgpE YXRlOiBUdWUsIDExIEphbiAyMDExIDE3OjU4OjM0IC0wNTAwClN1YmplY3Q6IFtQQVRDSF0gUGFy c2UgRGVjaW1hbCBOdW1iZXJzCgogKiBtb2R1bGUvbGFuZ3VhZ2UvZWNtYXNjcmlwdC9wYXJzZS5z Y206IGhhbmRsZSBudW1iZXJzIHdpdGggbGVhZGluZwogICAgZGVjaW1hbHMgY29ycmVjdGx5Lgot LS0KIG1vZHVsZS9sYW5ndWFnZS9lY21hc2NyaXB0L3BhcnNlLnNjbSB8ICAgIDEgKwogMSBmaWxl cyBjaGFuZ2VkLCAxIGluc2VydGlvbnMoKyksIDAgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEv bW9kdWxlL2xhbmd1YWdlL2VjbWFzY3JpcHQvcGFyc2Uuc2NtIGIvbW9kdWxlL2xhbmd1YWdlL2Vj bWFzY3JpcHQ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