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 20:36:40 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

I apologize for the duplicate, the previous mail was sent without CC
to mailing list.  I'm in Gnus studying stage.  I'm sorry.

Stefan Monnier <address@hidden> writes:

>> I use this mode for various experiments with languages.  In particular,
>> I do research in the field of creating a programming language called
>> Zephir.  I needed to get a formal description of the language and
>> this is exactly where I used the BNF.  This description (I prefer
>> "specification" word) used during systems analysis and requirements
>> analysis.
>
> So you don't use it together with a tool to process it?
> IOW you opted to use that particular syntax but could have used "any other"?

No, right now I don't use any tool with BNF together to process it.
Some things are not clear to me yet and I am in the way of
researching some convenient tools.  As for grammar - I use one more
step to convert final BNF grammar to yacc/bison syntax.  So as I said
before, I use BNF grammars mostly in system analysis and
analysis of requirements.

> Have you used the "; comment ... ;" commenting style?

As a far as I understood, this syntax is convenient for declarations
ending with a semicolon.  An ALGOL example:

--
procedure euler (fct,sum,eps,tim); value eps,tim; integer tim;
real procedure fct; real sum,eps;
comment euler computes the sum of fct(i) for i from zero up to
infinity by means of a suitably refined euler transformation;
--

Here "euler computes the sum of fct(i) for i from zero up to
infinity by means of a suitably refined euler transformation" is
a comment.

IOW you can't make a comment anywhere, you need a starting
semicolon.  However, if you choose a different commenting style
(just a semicolon), then you'll be forced to use quotes for
terminals:

--
<function-label> <identifier> "(" ")" "->" <return-type> ";"
--

Thus, my personal choice is to use "orthodox" (ALGOL) comments style
to keep grammar formal and short:

--
<function-label> <identifier> ( ) -> <return-type> ;
comment ... ;
--

The original BNF didn't even have a restriction in use of space
symbols, so that I can even use something like this:

--
<any sequence of symbols not containing ` or ' >
--

> Any plan to add support for the syntax supported by ebnf2ps, or the
> syntax used in RFCs in the short term?  That would make it a lot more
> useful, I think.

My next planned steps are to provide ABNF used in RFCs and EBNF
described in ISO/IEC 14977.  Honestly, I am new to ebnf2ps and so far
I have no clear understanding of possible integrations. Could you
elaborate on that?

> Also, if you need help adding SMIE support to it, feel free to ask.
> It should be pretty easy to get something going.

Yes, I definitely will need help.  Thank you.  Could you explain
any possible use case for SMIE?

>>> Please email the following information to address@hidden, and we
>>> will send you the assignment form for your past and future changes.
>> I'll do this ASAP.
>
> Great, thanks.  Let us known when you get confirmation that the FSF
> received your signed paperwork,
>

There is no answer yet so I suspect that I could fill in something
wrong in the form.  But let's wait.

-- 
Serghei



reply via email to

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