From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: SMIE Date: Thu, 28 Aug 2014 09:40:22 +0200 Organization: Organization?!? Message-ID: <87d2bl5aft.fsf@fencepost.gnu.org> 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 1409211672 17035 80.91.229.3 (28 Aug 2014 07:41:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2014 07:41:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 28 09:41:05 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 1XMuKN-0003cr-W2 for ged-emacs-devel@m.gmane.org; Thu, 28 Aug 2014 09:41:04 +0200 Original-Received: from localhost ([::1]:34968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMuKN-0004LH-JJ for ged-emacs-devel@m.gmane.org; Thu, 28 Aug 2014 03:41:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMuK6-0004Kg-74 for emacs-devel@gnu.org; Thu, 28 Aug 2014 03:40:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMuJy-0006y9-GT for emacs-devel@gnu.org; Thu, 28 Aug 2014 03:40:46 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMuJy-0006xQ-7H for emacs-devel@gnu.org; Thu, 28 Aug 2014 03:40:38 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XMuJv-0003FR-R0 for emacs-devel@gnu.org; Thu, 28 Aug 2014 09:40:35 +0200 Original-Received: from x2f401c1.dyn.telefonica.de ([2.244.1.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Aug 2014 09:40:35 +0200 Original-Received: from dak by x2f401c1.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Aug 2014 09:40:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f401c1.dyn.telefonica.de X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:17ZSXLSl9Te1XZJV2yE+fsfcEr8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:173862 Archived-At: Stefan Monnier writes: >> 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. "conditional". Would that have been so hard? -- David Kastrup