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
pa_oo.ml question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-03-30 (21:25)
From: Michael Wohlwend <micha-1@f...>
Subject: pa_oo.ml question
has anybody tried the oo-syntax extension given here:

http://www.math.nagoya-u.ac.jp/~garrigue/code/pa_oo.ml

compiling works (ocamlc -I +camlp4 -c -pp 'camlp4o pa_extend.cmo q_MLast.cmo' 
pa_oo.ml)

but compiling the code:
class xxx = object
 val mutable name = "" with accessor
end;;

gives this error:
> ocamlc -pp 'camlp4o -I . pa_oo.cmo' class.ml
File "", line 2, characters 23-27:
Parse error: 'end' expected after [class_structure] (in [class_expr])
Uncaught exception: Stream.Error("'end' expected after [class_structure] (in 
[class_expr])")
Preprocessor error

isn't this the way to use this extension?

cheers
 Michael