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 10:14:44 +0400 Message-ID: <5264C654.3010506@yandex.ru> References: <87eh7z1c8u.fsf@yandex.ru> <87d2nijcx8.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1382336107 3240 80.91.229.3 (21 Oct 2013 06:15:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2013 06:15:07 +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 08:15:10 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 1VY8lh-0003pg-DZ for ged-emacs-devel@m.gmane.org; Mon, 21 Oct 2013 08:15:09 +0200 Original-Received: from localhost ([::1]:38617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VY8lg-0002hW-Qe for ged-emacs-devel@m.gmane.org; Mon, 21 Oct 2013 02:15:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VY8lW-0002Tt-25 for emacs-devel@gnu.org; Mon, 21 Oct 2013 02:15:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VY8lN-0003Gm-Kf for emacs-devel@gnu.org; Mon, 21 Oct 2013 02:14:57 -0400 Original-Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:47492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VY8lN-0003Gd-DK for emacs-devel@gnu.org; Mon, 21 Oct 2013 02:14:49 -0400 Original-Received: by mail-ea0-f174.google.com with SMTP id z15so3173466ead.5 for ; Sun, 20 Oct 2013 23:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=vejnfFc3OHXg5tQ0mOqGG+lvV6+XqYzbAA8IWEPd5Ow=; b=gwVi3zTeziB/QgCUQeAczaN/JEzGNwR6TcYsolxCt1YmdlUbnu1DwP9Trbynxy6Cwq KGEi1MO6ATwJOMJ58zGKHpwdxIS/Ghk2feRVdBIkVBMB5oH38I5plCmTGDuC8BLY64Cs OVU2wpdcrytaCuMqberH4ylD71JpbUebDl01YGxuEq4kICYFGNgWsqQZZ8L63xq2Vq7n 5u3ZY2ymO+kHP1LiCx+NjTreHoMQgEKntkmJYnpeLpIyrGMt7BQD9aNBh1dSAFQ1Ozs8 tLM0eH+OBoueoF1nqUhO7Md6TNAHg9VTTpN59zEhFp6cnlOiiKUnb02r2rI7I1Jtlxig DCgQ== X-Received: by 10.15.74.197 with SMTP id j45mr20620750eey.40.1382336088400; Sun, 20 Oct 2013 23:14:48 -0700 (PDT) Original-Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id z12sm39660307eev.6.2013.10.20.23.14.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Oct 2013 23:14:47 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::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:164406 Archived-At: On 07.10.2013 08:05, Stefan Monnier wrote: >> Could you take a look at the examples I added in 114537 and 114538? > > See my answer patch. You'll see that I only added support for - and +. > Other infix operators are easy to add, but I'd rather someone go through > the trouble of finding the precedence table (BTW, you could also use the > trick used in sml-mode, where the infix operators are not specified in > the BNF grammar but only in a precedence table). Thank you, done, in 114732. Please review when you have the time. Some further questions: 1) Is `assoc' any different from `left' in practice? 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. 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.