From: Serghei Iakovlev <sadhooklay@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: bnf-mode
Date: Tue, 07 May 2019 20:36:40 +0300 [thread overview]
Message-ID: <875zqm5fpz.fsf@gmail.com> (raw)
In-Reply-To: <jwvftprgk3d.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 06 May 2019 20:59:16 -0400")
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 <monnier@iro.umontreal.ca> 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 assign@gnu.org, 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
next prev parent reply other threads:[~2019-05-07 17:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 15:51 [ELPA] New package: bnf-mode Serghei
2019-05-04 18:35 ` Stefan Monnier
[not found] ` <87h8a93qqu.fsf@gmail.com>
2019-05-05 14:49 ` Fwd: " Serghei Iakovlev
2019-05-05 14:56 ` Serghei Iakovlev
2019-05-05 16:07 ` Stefan Monnier
2019-05-05 22:31 ` John Yates
2019-05-06 0:47 ` Drew Adams
2019-05-06 0:48 ` Drew Adams
2019-05-06 5:54 ` Serghei Iakovlev
2019-05-06 12:31 ` Stefan Monnier
2019-05-06 18:57 ` Serghei Iakovlev
2019-05-07 0:59 ` Stefan Monnier
2019-05-07 17:36 ` Serghei Iakovlev [this message]
2019-05-07 17:58 ` Stefan Monnier
2019-05-07 18:54 ` Serghei Iakovlev
2019-05-07 19:01 ` Stefan Monnier
2019-05-09 4:06 ` Serghei Iakovlev
2019-05-05 15:01 ` Serghei Iakovlev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zqm5fpz.fsf@gmail.com \
--to=sadhooklay@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).