caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Tom Ridge <tom.j.ridge+list@googlemail.com>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] [ANN] P3 v. 2014-04-15d
Date: Tue, 15 Apr 2014 14:15:38 +0100	[thread overview]
Message-ID: <CABooLwPoa50T5uPpsz0D7r_mePesTy6wb8JyEvg4EiJn0G3iGQ@mail.gmail.com> (raw)

Dear All,

I'm pleased to announce a new release of the P3 combinator parser
library, and parser generator. It is essentially a synthesis of Earley
parsing with combinator parsing.

This release is not available on opam. The github url is:

  https://github.com/tomjridge/p3


The main features are:

  * handles all context free grammars

  * fast (when memoized)

  * correct (hopefully)

  * simple (depending on your viewpoint)

  * scannerless (for simplicity), or can work with an external lexer
    (for performance/disambiguation)

  * parsers implemented via combinators can be integrated easily with
    the core language (OCaml in this case), allowing full use of host
    language features eg modules etc


Current example performance figures are detailed here:

  https://github.com/tomjridge/p3/wiki/P3#performance


There is also a large real-world grammar example (the OCaml grammar)
in examples/ocamlyacc. This can parse a moderately sized (279 lines)
OCaml file in about 1 second. This is notable because we are using a
highly ambiguous grammar: we do not use precedence or associativity
restrictions, nor take advantage of shift/shift, shift/reduce conflict
resolution etc. It is also worth noting that P3 is a fully-online
parser, in the sense that it processes the grammar at parse time (in
order to make interactive development possible). Traditional parser
generators do a significant amount of work offline, when generating
the parser, and so the actual work they do at parse time is
potentially much reduced.

Thanks

Tom

                 reply	other threads:[~2014-04-15 13:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CABooLwPoa50T5uPpsz0D7r_mePesTy6wb8JyEvg4EiJn0G3iGQ@mail.gmail.com \
    --to=tom.j.ridge+list@googlemail.com \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).