From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel Subject: Re: ruby-mide, SMIE and token priority Date: Mon, 11 Nov 2013 17:13:34 +0200 Message-ID: References: <527B069B.6020400@yandex.ru> <527B9163.3020102@yandex.ru> <87bo1rqep1.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134ad06fb254e04eae82c81 X-Trace: ger.gmane.org 1384182825 21166 80.91.229.3 (11 Nov 2013 15:13:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Nov 2013 15:13:45 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 11 16:13:47 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 1VftBQ-0003aj-94 for ged-emacs-devel@m.gmane.org; Mon, 11 Nov 2013 16:13:44 +0100 Original-Received: from localhost ([::1]:37806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VftBP-0004qv-Qk for ged-emacs-devel@m.gmane.org; Mon, 11 Nov 2013 10:13:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VftBJ-0004ph-43 for emacs-devel@gnu.org; Mon, 11 Nov 2013 10:13:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VftBH-0004m3-RS for emacs-devel@gnu.org; Mon, 11 Nov 2013 10:13:37 -0500 Original-Received: from mail-oa0-x236.google.com ([2607:f8b0:4003:c02::236]:63354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VftBH-0004ly-Jy for emacs-devel@gnu.org; Mon, 11 Nov 2013 10:13:35 -0500 Original-Received: by mail-oa0-f54.google.com with SMTP id o6so1916278oag.41 for ; Mon, 11 Nov 2013 07:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=9xAKDwG91hXqCvZcPE97HzcypV96eQkuJgZWG/NUDnY=; b=FprVKVleRZXhzdBkcqhxatWCLiwr/B4pgW2MNhyUMk/WiWhrbFeP9+8vFfLc3+rSQm 7T/Xt+N/zNn3fsCEL0z07FmqcjqzfaEfJSDbGXC7CZJl7LZ0sqH8sldGmbNTaInFuP04 b8cdtKswLmzvuaU5fL5n08G7KHlrNc7IGep6WlmbsjJdP0HhQLolnqzjdY45drgOs60k tTRNttZILozrFcDBiAX/x2BcSaYG4g+cOEpA8evNgDkeojDPNbkbGbUSxq2lSZFtqlQQ x7jMHt7zavLpNuHt0yZPdr5aWTug7wysQhzGQBqZPuAi6zRmbX6VbapvzhW4XCYfnWKy KI8Q== X-Received: by 10.182.2.42 with SMTP id 10mr1665138obr.73.1384182814809; Mon, 11 Nov 2013 07:13:34 -0800 (PST) Original-Received: by 10.76.21.173 with HTTP; Mon, 11 Nov 2013 07:13:34 -0800 (PST) In-Reply-To: <87bo1rqep1.fsf@yandex.ru> X-Google-Sender-Auth: qMtI9gJy5-We6FZjXuH1-Nl3Je8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::236 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:165168 Archived-At: --001a1134ad06fb254e04eae82c81 Content-Type: text/plain; charset=UTF-8 At first glance everything looks good to me. I was extremely happy to see you've fixed the indentation for: if foo && bar end The old (incorrect) behaviour was quite an annoyance for many Ruby programmers. On 11 November 2013 14:56, Dmitry Gutov wrote: > Bozhidar Batsov writes: > > > I've just noticed that issue myself. Is there any progress on it? > > Yes. Try the latest trunk, and check out the examples in > test/indent/ruby.rb. All of them currently work (or else there would be > a comment saying that some don't). > > If you have any new broken examples or disagree with some of the choices > in ruby.rb, please tell. > > > > > On 7 November 2013 18:02, Stefan Monnier > > wrote: > > > > >>> Is it at all possible to change the grammar this way? > > >> You'd probably have to use a trick similar to the " @ " used on > > the > > >> space between the method name and the multiple-args. > > > Ah, okay. Sounds not very efficient, performance-wise. > > > > > > Could be. Every trick we add to the tokenizer is a potential > > performance problem, indeed. On the contrary, code in the > > rules-function is generally not performance sensitive. > > > > > > Stefan > > > > > --001a1134ad06fb254e04eae82c81 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
At first glance everything looks good to me. I was extreme= ly happy to see you've fixed the indentation for:

if foo &&
=C2=A0 =C2=A0bar
end

The old (incorrect) behaviour was quite an annoyance for many Ruby pro= grammers.



On 11 November 2013 14:56, Dmitry Gutov <dgutov@yand= ex.ru> wrote:
Bozhidar Batsov <bozhidar@batsov.com> writes:

> I've just noticed that issue myself. Is there any progress on it?<= br>
Yes. Try the latest trunk, and check out the examples in
test/indent/ruby.rb. All of them currently work (or else there would be
a comment saying that some don't).

If you have any new broken examples or disagree with some of the choices in ruby.rb, please tell.

>
> On 7 November 2013 18:02, Stefan Monnier <monnier@iro.umontreal.ca>
> wrote:
>
> =C2=A0 =C2=A0 >>> Is it at all possible to change the grammar= this way?
> =C2=A0 =C2=A0 >> You'd probably have to use a trick similar = to the " @ " used on
> =C2=A0 =C2=A0 the
> =C2=A0 =C2=A0 >> space between the method name and the multiple-= args.
> =C2=A0 =C2=A0 > Ah, okay. Sounds not very efficient, performance-wi= se.
>
>
> =C2=A0 =C2=A0 Could be. Every trick we add to the tokenizer is a poten= tial
> =C2=A0 =C2=A0 performance problem, indeed. On the contrary, code in th= e
> =C2=A0 =C2=A0 rules-function is generally not performance sensitive. >
>
> =C2=A0 =C2=A0 Stefan
>
>

--001a1134ad06fb254e04eae82c81--