From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: trunk r114534: Get Ruby's SMIE code to pass the test suite. Date: Mon, 21 Oct 2013 18:16:54 +0400 Message-ID: <877gd6ogix.fsf@yandex.ru> References: <87eh7z1c8u.fsf@yandex.ru> <87d2nijcx8.fsf@yandex.ru> <5264C654.3010506@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382365034 14435 80.91.229.3 (21 Oct 2013 14:17:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2013 14:17:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 21 16:17:17 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VYGIH-00024J-J7 for ged-emacs-devel@m.gmane.org; Mon, 21 Oct 2013 16:17:17 +0200 Original-Received: from localhost ([::1]:40250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYGIH-0006YO-4K for ged-emacs-devel@m.gmane.org; Mon, 21 Oct 2013 10:17:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYGI8-0006Xj-3K for emacs-devel@gnu.org; Mon, 21 Oct 2013 10:17:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYGI2-0001nj-Nz for emacs-devel@gnu.org; Mon, 21 Oct 2013 10:17:08 -0400 Original-Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]:59087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYGI2-0001nQ-G1 for emacs-devel@gnu.org; Mon, 21 Oct 2013 10:17:02 -0400 Original-Received: by mail-lb0-f174.google.com with SMTP id w6so5528685lbh.5 for ; Mon, 21 Oct 2013 07:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=LGpj+PVX5Kxy/Zfn8YqxzuMYxN16E6P1RMZ4A5zHSHE=; b=wfouk8gO+ibMdKUMlDzlNDdAN3+8ROYF4ZlMHLFi3seUPmBUQ73Q5ByNi3zC2pdSVv mXYD4sPBLOBkiC2eK3gBLA4REybOa5OGhJY1I7MraC6rYIPxrVNK3xLjosKre3HUE4Di dXiRGDeUOhydx9Pfgqh9NJhS1koOd0dkM92S7wfpnLcjXFGQLxLW9v82j6Y0k7OpJR5M W1BoHt7u4f3Jre0DRALKQf+KGsJvqzxHmDxj4RQzECkIN3FK/5OAPmyPyr8mapYX3JHY TJXk+mCMps92fKoUbOejfHNRxkWHmaARvqzMVzXKTRE5fcV28V3XfI5fnh6+2LUhKxff c/oA== X-Received: by 10.112.136.195 with SMTP id qc3mr20977lbb.55.1382365021233; Mon, 21 Oct 2013 07:17:01 -0700 (PDT) Original-Received: from axl ([178.252.98.87]) by mx.google.com with ESMTPSA id i3sm16261559laf.4.2013.10.21.07.16.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 21 Oct 2013 07:17:00 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Mon, 21 Oct 2013 08:46:19 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164417 Archived-At: Stefan Monnier writes: >> 1) Is `assoc' any different from `left' in practice? > > Yes: with `assoc', when you have "a + b + c", smie first tries to align > "c" with "b", whereas with `left' it would skip "b" and go straight to > "a". When there are only 3 elements, it rarely makes a difference, but > for things like "," or ";" where there can be tens or hundreds of > elements, the different can be very significant in terms of > indentation speed. Also, it makes a difference if the user purposefully > "misindents" some of the elements, of course. I see. > Maybe change the tokenizer so that a ".qux" *at smie-bolp* is tokenized > as "." and "qux"? That will probably break the following modified example: class C def foo self .end D.new .class end end But I guess we can make the tokenizer both return "." as a separate token and include it in the token that goes after it.