emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] New package: bnf-mode


From: Serghei Iakovlev
Subject: Re: [ELPA] New package: bnf-mode
Date: Tue, 07 May 2019 21:54:11 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> --
>> <function-label> <identifier> ( ) -> <return-type> ;
>> comment ... ;
>> --
>
> Makes sense (as long as your language doesn't have a construction where
> ";" and "comment" follow each other as terminals ;-).

Yes, it is inconvenient and probably was developed mainly for
ALGOL.  That's why I rarely use comments.  However, in my opinion,
this is better than quoting terminals.

>> Yes, I definitely will need help.  Thank you.  Could you explain
>> any possible use case for SMIE?
>
> It's a package for (navigation and) indentation.

I know that.  However at the moment I don't see possible indentation,
except for the following two use cases:

--
<nonterminal> ::= ...
        <foo> ::= ...
    <foo-bar> ::= ...
--
Figure #1: Align by "::="

and

--
<nonterminal> := A | B | C 
               | D | E | F
               | G | ...
--
Figure #2: Align alternatives

So, honestly I don't know how SMIE can help here.

-- 
Serghei



reply via email to

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