[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SMIE
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
- Re: SMIE, (continued)
- Re: SMIE, Tassilo Horn, 2014/08/18
- Re: SMIE, Stefan Monnier, 2014/08/18
- Re: SMIE, Richard Stallman, 2014/08/19
- Re: SMIE, Bastien, 2014/08/19
- Re: SMIE, Richard Stallman, 2014/08/19
- Re: SMIE, Matt DeBoard, 2014/08/19
- Re: SMIE, Ivan Andrus, 2014/08/19
- Re: SMIE, Stefan Monnier, 2014/08/20
- Re: SMIE, Matt DeBoard, 2014/08/27
- Re: SMIE, Stefan Monnier, 2014/08/27
- Re: SMIE,
David Kastrup <=
- Re: SMIE, Dmitry, 2014/08/28
Re: SMIE, Andreas Röhler, 2014/08/17