From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Edward O'Connor" Newsgroups: gmane.emacs.bugs Subject: bug#679: 23.0.60; Function json-read-number does not handle complete Javascript spec Date: Mon, 18 Aug 2008 22:37:27 -0700 Message-ID: <3b31caf90808182237g265b239fgfb4a365686eac490__45118.9162712128$1219124927$gmane$org@mail.gmail.com> References: <87r68th97h.fsf@stupidchicken.com> <3b31caf90808122211p3354755td198047ad90064a4@mail.gmail.com> <48A39781.6030606@gmail.com> Reply-To: Edward O'Connor , 679@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1080_5092177.1219124247434" X-Trace: ger.gmane.org 1219124869 29104 80.91.229.12 (19 Aug 2008 05:47:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Aug 2008 05:47:49 +0000 (UTC) Cc: 679@emacsbugs.donarmstrong.com, Kevin Rodgers To: emacs-devel@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 19 07:48:41 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KVK55-0003Ol-Cz for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Aug 2008 07:48:35 +0200 Original-Received: from localhost ([127.0.0.1]:46061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVK48-0000i6-EN for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Aug 2008 01:47:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVK43-0000hU-NO for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2008 01:47:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVK41-0000h6-PX for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2008 01:47:30 -0400 Original-Received: from [199.232.76.173] (port=38347 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVK41-0000h3-J6 for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2008 01:47:29 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45430) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KVK40-0008H5-UQ for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2008 01:47:29 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7J5lQfn010532; Mon, 18 Aug 2008 22:47:26 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7J5j4gY009371; Mon, 18 Aug 2008 22:45:04 -0700 X-Loop: don@donarmstrong.com Resent-From: "Edward O'Connor" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 19 Aug 2008 05:45:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 679 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 679-submit@emacsbugs.donarmstrong.com id=B679.12191242527468 (code B ref 679); Tue, 19 Aug 2008 05:45:04 +0000 Original-Received: (at 679) by emacsbugs.donarmstrong.com; 19 Aug 2008 05:37:32 +0000 Original-Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7J5bRiE007462 for <679@emacsbugs.donarmstrong.com>; Mon, 18 Aug 2008 22:37:29 -0700 Original-Received: by yx-out-2324.google.com with SMTP id 8so1285137yxg.31 for <679@emacsbugs.donarmstrong.com>; Mon, 18 Aug 2008 22:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=zyrNwrU9CGQyiJWLZIOw3OXkGKy/3OCcn4mZRAOTKio=; b=PElf+HCV1q3koeLPRmwDMk0mzMV2c14prneXnBHYQiQagt7aT+bYE+XRXGvLS1NLtA AUv3sHvzab3VI/ZHnRJCZ/jmsCpCnPKQKAGEExrfX6JO5aqDuXz03uWHRN6N14I6MXFT YefGlKygC/HH7h1Ifk8v7heaT1i7tSM2vmfFA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=TSUGF653aM1Qg84pZfJJ69No0ciw6tYVLiQ/BDPf0TSwygTXjOwaIMNICuICo9jE4/ ATpAXbgUMu26V7866GCAjliVE9e7OJYEHQ/0lt1InYmc8rddNYj6MyrG8PvBohtVBIK2 +uxJ89h2wv5vpzWPRkMm0j60GcKWLd+8dEFYU= Original-Received: by 10.151.114.6 with SMTP id r6mr11141136ybm.84.1219124247561; Mon, 18 Aug 2008 22:37:27 -0700 (PDT) Original-Received: by 10.150.185.5 with HTTP; Mon, 18 Aug 2008 22:37:27 -0700 (PDT) In-Reply-To: <48A39781.6030606@gmail.com> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Tue, 19 Aug 2008 01:47:30 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19536 Archived-At: ------=_Part_1080_5092177.1219124247434 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline > Here's an improved version: Besides recognizing the D. and .D number > forms mentioned in the original bug report, and the positive signed > forms mentioned in my first response, it also > > (a) recognizes hexadecimal and octal integers per > http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Literals#Integers JSON disallows octal and hexadecimal notation... > I hope you'll use it. I've attached a modified version, which disallows octal & hexadecimal. Thanks, Ted ------=_Part_1080_5092177.1219124247434 Content-Type: application/octet-stream; name=json-number.diff Content-Transfer-Encoding: base64 X-Attachment-Id: f_fk232jdz0 Content-Disposition: attachment; filename=json-number.diff PyBqc29uLW51bWJlci5kaWZmCj8gcWVkLmRpZmYKSW5kZXg6IGxpc3AvanNvbi5lbAo9PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09ClJDUyBmaWxlOiAvc291cmNlcy9lbWFjcy9lbWFjcy9saXNwL2pzb24uZWwsdgpyZXRyaWV2 aW5nIHJldmlzaW9uIDEuNQpkaWZmIC11IC11IC1yMS41IGpzb24uZWwKLS0tIGxpc3AvanNvbi5l bAk4IE1heSAyMDA4IDAzOjM3OjA3IC0wMDAwCTEuNQorKysgbGlzcC9qc29uLmVsCTE5IEF1ZyAy MDA4IDA1OjM1OjU4IC0wMDAwCkBAIC0yMjEsMTkgKzIyMSwyNyBAQAogCiA7OyBOdW1iZXIgcGFy c2luZwogCi0oZGVmdW4ganNvbi1yZWFkLW51bWJlciAoKQotICAiUmVhZCB0aGUgSlNPTiBudW1i ZXIgZm9sbG93aW5nIHBvaW50LgorKGRlZnVuIGpzb24tcmVhZC1udW1iZXIgKCZvcHRpb25hbCBz aWduKQorICJSZWFkIHRoZSBKU09OIG51bWJlciBmb2xsb3dpbmcgcG9pbnQuCitUaGUgb3B0aW9u YWwgU0lHTiAgYXJndW1lbnQgaXMgZm9yIGludGVybmFsIHVzZS4KKwogTi5CLjogT25seSBudW1i ZXJzIHdoaWNoIGNhbiBmaXQgaW4gRW1hY3MgTGlzcCdzIG5hdGl2ZSBudW1iZXIKIHJlcHJlc2Vu dGF0aW9uIHdpbGwgYmUgcGFyc2VkIGNvcnJlY3RseS4iCi0gIChpZiAoY2hhci1lcXVhbCAoanNv bi1wZWVrKSA/LSkKLSAgICAgIChwcm9nbgotICAgICAgICAoanNvbi1hZHZhbmNlKQotICAgICAg ICAoLSAwIChqc29uLXJlYWQtbnVtYmVyKSkpCi0gICAgKGlmIChsb29raW5nLWF0ICJbMC05XStc XChbLl1bMC05XStcXCk/XFwoW2VFXVsrLV0/WzAtOV0rXFwpPyIpCi0gICAgICAgIChwcm9nbgor IDs7IElmIFNJR04gaXMgbm9uLW5pbCwgdGhlIG51bWJlciBpcyBleHBsaWNpdGx5IHNpZ25lZC4K KyAobGV0ICgobnVtYmVyLXJlZ2V4cAorICAgICAgICAiXFwoWzAtOV0rXFwpP1xcKFxcLlswLTld K1xcKT9cXChbRWVdWystXT9bMC05XStcXCk/IikpCisgICAoY29uZCAoKGFuZCAobnVsbCBzaWdu KSAoY2hhci1lcXVhbCAoanNvbi1wZWVrKSA/LSkpCisgICAgICAgICAgKGpzb24tYWR2YW5jZSkK KyAgICAgICAgICAoLSAoanNvbi1yZWFkLW51bWJlciB0KSkpCisgICAgICAgICAoKGFuZCAobnVs bCBzaWduKSAoY2hhci1lcXVhbCAoanNvbi1wZWVrKSA/KykpCisgICAgICAgICAgKGpzb24tYWR2 YW5jZSkKKyAgICAgICAgICAoanNvbi1yZWFkLW51bWJlciB0KSkKKyAgICAgICAgICgoYW5kIChs b29raW5nLWF0IG51bWJlci1yZWdleHApCisgICAgICAgICAgICAgICAob3IgKG1hdGNoLWJlZ2lu bmluZyAxKQorICAgICAgICAgICAgICAgICAgIChtYXRjaC1iZWdpbm5pbmcgMikpKQogICAgICAg ICAgIChnb3RvLWNoYXIgKG1hdGNoLWVuZCAwKSkKICAgICAgICAgICAoc3RyaW5nLXRvLW51bWJl ciAobWF0Y2gtc3RyaW5nIDApKSkKLSAgICAgIChzaWduYWwgJ2pzb24tbnVtYmVyLWZvcm1hdCAo bGlzdCAocG9pbnQpKSkpKSkKKyAgICAgICAgICh0IChzaWduYWwgJ2pzb24tbnVtYmVyLWZvcm1h dCAobGlzdCAocG9pbnQpKSkpKSkpCiAKIDs7IE51bWJlciBlbmNvZGluZwogCkBAIC00NzAsNyAr NDc4LDcgQEAKICAgICAgICAgICAgKD9cIiBqc29uLXJlYWQtc3RyaW5nKSkpKQogICAgIChtYXBj IChsYW1iZGEgKGNoYXIpCiAgICAgICAgICAgICAocHVzaCAobGlzdCBjaGFyICdqc29uLXJlYWQt bnVtYmVyKSB0YWJsZSkpCi0gICAgICAgICAgJyg/LSA/MCA/MSA/MiA/MyA/NCA/NSA/NiA/NyA/ OCA/OSkpCisgICAgICAgICAgJyg/LSA/KyA/LiA/MCA/MSA/MiA/MyA/NCA/NSA/NiA/NyA/OCA/ OSkpCiAgICAgdGFibGUpCiAgICJSZWFkdGFibGUgZm9yIEpTT04gcmVhZGVyLiIpCiAK ------=_Part_1080_5092177.1219124247434--