caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] P3 v. 2014-04-15d
@ 2014-04-15 13:15 Tom Ridge
  0 siblings, 0 replies; only message in thread
From: Tom Ridge @ 2014-04-15 13:15 UTC (permalink / raw)
  To: caml-list

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-15 13:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15 13:15 [Caml-list] [ANN] P3 v. 2014-04-15d Tom Ridge

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).