From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: picflo_2@web.de
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] ABNF Parser
Date: Fri, 18 Mar 2016 22:10:17 +0100 [thread overview]
Message-ID: <CAPFanBECMcQaKsQk6QGvPB3woGskD+ttH1yj+_R2syNG=fhZnw@mail.gmail.com> (raw)
In-Reply-To: <trinity-bd1e6579-9d81-4eec-9559-6d974d87c400-1458298819547@3capp-webde-bs09>
Googling for "ocaml abnf" directs to
https://github.com/avsm/ocaml-abnf
which seem to be an experimental project, but a good starting point.
It has a lexer and a parser for abnf grammars,
https://github.com/avsm/ocaml-abnf/blob/master/abnf_lexer.mll
https://github.com/avsm/ocaml-abnf/blob/master/abnf_parser.mly
a type representing the ABNF abstract syntax tree
https://github.com/avsm/ocaml-abnf/blob/master/abnf_signature.ml
a parser for the grammars embedded in a small command-line tool (that
can also output abnf grammars in several representations)
https://github.com/avsm/ocaml-abnf/blob/master/abnf_cmd.ml
and two examples of abnf grammars
https://github.com/avsm/ocaml-abnf/blob/master/http.abnf
https://github.com/avsm/ocaml-abnf/blob/master/imap.abnf
On Fri, Mar 18, 2016 at 12:00 PM, <picflo_2@web.de> wrote:
> Hi,
>
> i want to encode my network protocols inside a state machine which i derive
> from an abnf specification. Ideally i would like to generate the client and
> server side from
> a single ABNF spec. Is this a valid approach and if so is there some OCaml
> open source project for reading abnf specs?
>
> I would also be very interested in how others approach encoding network
> protocols for distributed systems, especially with OCaml.
>
> Best regards,
>
> Florian
prev parent reply other threads:[~2016-03-18 21:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 11:00 picflo_2
2016-03-18 21:10 ` Gabriel Scherer [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPFanBECMcQaKsQk6QGvPB3woGskD+ttH1yj+_R2syNG=fhZnw@mail.gmail.com' \
--to=gabriel.scherer@gmail.com \
--cc=caml-list@inria.fr \
--cc=picflo_2@web.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox