Version française
Home     About     Download     Resources     Contact us    
Browse thread
Jane St Capital Ocaml Summer Project code?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: Re: [Caml-list] Jane St Capital Ocaml Summer Project code?
Erik de Castro Lopo a écrit :
> Christophe Raffalli wrote:
>
>   
>> Have you looked at dypgen ... (http://dypgen.free.fr/), it even offers 
>> integrated lexer in the latest version
>>     
>
> I haven't really looked at that. What are the relative strengths and
> weaknesses of the two?
>
> Erik
>   
Here is what I mostly like (you have a comparison table here 
http://www.lama.univ-savoie.fr/~raffalli/ocaml-parsing.html:

dypgen :

- GLR instead of LR(1) : this gives much more elegant description of the 
grammar (and the possibiliy of ambigous grammar) and there
is never a conflict. These are replaced by multiple parse trees (you can 
choose a merge function that will report that as an error, if you think
your grammar should not be ambiguous).

- pattern matching in rule. Example: you define a grammar for list of 
expressions of any-size, but you can restrict the usage
to list of length at least 1, 2, ... by pattern matching)

- late reject of a rule by raising an exception.

- self extensible lexer and parser with delimited scope.

menhir :

- should be faster because it is only LR(1), but I did not test

- you know for sure that your grammer is not ambiguous ...