As some know, I have been developing a branch of the pappy parser
generator for haskell, I thought I'd give an update to the list on how
that is going, and what changes I have made.

first of all, my version of pappy is in the darcs repository located
here: http://repetae.net/repos/pappy

you can fetch it with 

; darcs get http://repetae.net/repos/pappy

Some improvements over Bryan's original version are:

* explicit export lists on parsers
* stand alone mode, pappy will include everything needed to compile a
  parser in the haskell file generated (or optionally let you use
  external libraries)
* type inference for (), including the ability of the parser to
  recognize when the result type is () and automatically add the -> { ()
  } that used to be needed to each branch.
* an 'import' statement, to import libraries of parsing rules from other
  files.
* multiple entry points into the parser
* ability to parse streams of things other than 'Char'. This can be used
  for a pre-tokenized stream, or if you need an augmented token stream
  for something like haskell's indentation based grouping.

enjoy! I just thought I would share in case anyone else out there were
using pappy but wished it had just a bit more. :) I use it for several
of my own projects (I intend to replace the jhc haskell parser with
pappy at some point) so will likely continue to improve it as needed.

        John


-- 
John Meacham - ⑆repetae.net⑆john⑈

_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to