[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: David Kastrup
Subject: Re: SMIE
Date: Thu, 28 Aug 2014 09:40:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Stefan Monnier <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]