English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Functional programming using caml light
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-11-01 (12:43)
From: ciol <ciol13@g...>
Subject: Re: Functional programming using caml light
ciol wrote:

> after factoring common prefixes, the author obtains :
> 
> Expr ::= Mult RestExpr
> 
> RestExpr ::= + Mult RestExpr
>             |- Mult RestEXpr
>             |(* nothing *)
> 
> [...]
> 
> But I don't obtain the same result for RestExpr :
> 
> RestExpr ::= + Mult Expr
>             |- Mult Expr
>             | (* nothing *)
> 

_Sorry_, it's an error, I obtain :
RestExpr ::= + Expr
            | - Expr
            | (* nothing *)

But I've just realized that the author's solution is in fact the same as 
mine (he replaced Expr in RestExpr by Mult RestExpr. But why ? Isn't it 
more complicated ? The result in caml will be identical  wont it be ?