From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: trunk r114534: Get Ruby's SMIE code to pass the test suite.
Date: Mon, 21 Oct 2013 18:16:54 +0400 [thread overview]
Message-ID: <877gd6ogix.fsf@yandex.ru> (raw)
In-Reply-To: <jwv38nu94u6.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 21 Oct 2013 08:46:19 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> 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.
next prev parent reply other threads:[~2013-10-21 14:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1VSWj3-0005Os-CP@vcs.savannah.gnu.org>
2013-10-06 0:20 ` trunk r114534: Get Ruby's SMIE code to pass the test suite Dmitry Gutov
2013-10-06 16:45 ` Stefan Monnier
2013-10-06 21:40 ` Dmitry Gutov
2013-10-07 4:05 ` Stefan Monnier
2013-10-21 6:14 ` Dmitry Gutov
2013-10-21 12:46 ` Stefan Monnier
2013-10-21 14:16 ` Dmitry Gutov [this message]
2013-10-21 16:46 ` Stefan Monnier
2013-10-21 22:30 ` Dmitry Gutov
2013-10-22 15:46 ` Stefan Monnier
2013-10-22 15:47 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gd6ogix.fsf@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).