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: SMIE Date: Wed, 27 Aug 2014 23:11:00 -0400 Message-ID: References: <87y4ukr2kg.fsf@bzg.ath.cx> <97B176AD-AB59-4589-BB7C-3751A424A77B@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409195502 7417 80.91.229.3 (28 Aug 2014 03:11:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2014 03:11:42 +0000 (UTC) Cc: Ivan Andrus , emacs To: Matt DeBoard Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 28 05:11:34 2014 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 1XMq7Y-00023L-QP for ged-emacs-devel@m.gmane.org; Thu, 28 Aug 2014 05:11:32 +0200 Original-Received: from localhost ([::1]:34204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMq7Y-0004fz-Ca for ged-emacs-devel@m.gmane.org; Wed, 27 Aug 2014 23:11:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMq7F-0004ew-Bz for emacs-devel@gnu.org; Wed, 27 Aug 2014 23:11:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMq77-0000x8-Sm for emacs-devel@gnu.org; Wed, 27 Aug 2014 23:11:13 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:58742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMq77-0000wz-NP for emacs-devel@gnu.org; Wed, 27 Aug 2014 23:11:05 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s7S3B1BQ031594; Wed, 27 Aug 2014 23:11:01 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 8216D660C4; Wed, 27 Aug 2014 23:11:00 -0400 (EDT) In-Reply-To: (Matt DeBoard's message of "Wed, 27 Aug 2014 17:44:50 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV5046=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5046> : inlines <1219> : streams <1275656> : uri <1807498> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:173860 Archived-At: > I know this is a long shot, but I am reading through ruby-mode.el's grammar > table, and it uses the token "iuwu-mod" but I have no idea what that means. The SMIE grammar does not use "keywords names" but "token names". Most tokens represent a keyword and use the same name as that keyword, but sometimes the same keyword is mapped to different tokens depending on context. That's what the *-forward-token and *-backward-token functions are for. If you look at ruby-smie--forward-token, for example, you'll see that it can return "iuwu-mod" in the following case: ((member tok '("unless" "if" "while" "until")) (if (save-excursion (forward-word -1) (ruby-smie--bosp)) tok "iuwu-mod")) So I guess you can now guess what "iuwu" stands for. As for the "mod", it stands for "statement MODifier", IIRC. Stefan