help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: SMIE examples or guides


From: Björn Lindqvist
Subject: Re: SMIE examples or guides
Date: Wed, 29 Jun 2016 00:30:44 +0200

Thank you. That makes some indentation happening, but what I get is
(hoping gmail preserves leading whitespace):

first
    HELLO
        HELLO foo BYE
            HELLO
                bla
                    net
                    neat
            BYE
            text more
            more
    BYE


What I would like instead is:

first
HELLO
    HELLO foo BYE
    HELLO
        bla
        net
        neat
        BYE
    text more
    more
    BYE
text

2016-06-28 23:42 GMT+02:00 Stefan Monnier <monnier@iro.umontreal.ca>:
>> Yes, I understand.  But I'm completely at loss on how to do that or
>> even getting started.  I have seen what rules octave-mode has, but I
>
> Have you looked at its grammar?  That would probably be a better start
> for your grammar.
>
>> don't know how to adapt that to my scenario (HELLO token begins
>> indentation, BYE token ends it).
>
> So it sounds like
>
>    (deconst factor-smie-grammar
>      (smie-prec2->grammar
>       (smie-bnf->prec2
>        '((exp ("HELLO" exp "BYE"))))))
>
> might be a good start.
>
>
>         Stefan


-- 
mvh/best regards Björn Lindqvist



reply via email to

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