Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
free, open-source version of OCaml grammar?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-15 (20:07)
From: David Allsopp <dra-news@m...>
Subject: RE: [Caml-list] free, open-source version of OCaml grammar?

Yitzhak Mendelbaum wrote:
> I'd like to port the OCaml grammar to another parser generator.

What *exactly* do you mean by port? A line-by-line conversion of
parsing/parser.mly to a your new parser generator's syntax or a brand new
file which exactly parses the same grammar as parsing/parser.mly?

> However, the grammar is covered under the Q Public License, and the
> terms of the license seem to require that the ported version only be
> distributed as a patch to the current YACC grammar.

If you're doing a line-by-line conversion then that might reasonably be
regarded as derivative but if you produce a brand new source file for your
new parser generator for the OCaml language then I would not expect that to
be covered by any aspect of OCaml's licence because the licence covers the
source code of Inria's OCaml (i.e. Copyright) and not the idea of the OCaml
language (i.e. Patent). I have no idea whether the OCaml grammar is
patented, though I'd be surprised if it were as you would have expected
Microsoft to have steered clear when developing F#.

> Given that I'm
> porting the grammar to serve as an example for a new parser generator,
> distributing it as an unreadable patch is quite impractical.

If you're using it as a demo, then I expect you'll find that the benevolent
OCaml team may well be happy to exempt the licence for that use anyway!