[Caml-list] Define parser and printer consistently

2010-12-09 Thread CUOQ Pascal
I'm going to define a parser and a printer for a simple grammar. Is there a way to define both of them in a single construct using some existing OCaml tool? For example, I have a keyword function. The usual parser would contain a mapping like: function - `Function and the straightforward

Re: [Caml-list] Define parser and printer consistently

2010-12-09 Thread Romain Bardou
On 09/12/2010 05:47, Dawid Toton wrote: I'm going to define a parser and a printer for a simple grammar. Is there a way to define both of them in a single construct using some existing OCaml tool? For example, I have a keyword function. The usual parser would contain a mapping like: function -

Re: [Caml-list] Define parser and printer consistently

2010-12-09 Thread Yitzhak Mandelbaum
PADS/ML can do that for you, and more. You can find information about the PADS languages and tools here: http://www.padsproj.org including papers and a manual. The website doesn't have the most recent release of PADS/ML -- i plan to put it up on Github shortly -- but if you're interested,

[Caml-list] Define parser and printer consistently

2010-12-08 Thread Dawid Toton
I'm going to define a parser and a printer for a simple grammar. Is there a way to define both of them in a single construct using some existing OCaml tool? For example, I have a keyword function. The usual parser would contain a mapping like: function - `Function and the straightforward

Re: [Caml-list] Define parser and printer consistently

2010-12-08 Thread Ashish Agarwal
Maybe you will find Pickler Combinators useful: http://research.microsoft.com/en-us/um/people/akenn/fun/picklercombinators.pdf On Wed, Dec 8, 2010 at 11:47 PM, Dawid Toton d...@wp.pl wrote: I'm going to define a parser and a printer for a simple grammar. Is there a way to define both of them