From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: trunk r114534: Get Ruby's SMIE code to pass the test suite. Date: Mon, 21 Oct 2013 08:46:19 -0400 Message-ID: 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 1382359599 9682 80.91.229.3 (21 Oct 2013 12:46:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2013 12:46:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 21 14:46:42 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 1VYEsc-0006Yp-Ou for ged-emacs-devel@m.gmane.org; Mon, 21 Oct 2013 14:46:42 +0200 Original-Received: from localhost ([::1]:39925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYEsc-0004nr-D6 for ged-emacs-devel@m.gmane.org; Mon, 21 Oct 2013 08:46:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYEsS-0004nU-NN for emacs-devel@gnu.org; Mon, 21 Oct 2013 08:46:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYEsG-0000CZ-MW for emacs-devel@gnu.org; Mon, 21 Oct 2013 08:46:32 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:27589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYEsG-0000CO-IO for emacs-devel@gnu.org; Mon, 21 Oct 2013 08:46:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLCX/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFFxLCX/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35962516" Original-Received: from 69-196-176-151.dsl.teksavvy.com (HELO pastel.home) ([69.196.176.151]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 21 Oct 2013 08:46:19 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 3F5CF6032D; Mon, 21 Oct 2013 08:46:19 -0400 (EDT) In-Reply-To: <5264C654.3010506@yandex.ru> (Dmitry Gutov's message of "Mon, 21 Oct 2013 10:14:44 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:164413 Archived-At: > 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. > 2) `ruby-smie-grammar' has a FIXME at the top. What kind of Cucumber support > do you suppose is missing? The "Given /toto/ do" example in ruby.rb looks > fine, mostly due to the syntax-propertize-function, which hasn't changed. That fixme migth be out of date, indeed. > 3) Please take a look at the following example: > foo_bar_tee(1, 2, 3) > .qux > What would be the best way to make it work (and also similar example with > the dot on the first line)? > Add another two cases to `ruby-smie-rules', for the token "."? That wouldn't > exactly, I think, work because `ruby-smie--forward-token' and its > counterpart like to concatenate the dot with the identifier that goes > after it. Maybe change the tokenizer so that a ".qux" *at smie-bolp* is tokenized as "." and "qux"? Stefan