Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] camlp4 avec ocamlopt
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stalkern 2 <stalkern2@t...>
Subject: [Caml-list] camlp4 avec ocamlopt
Savez-vous si on peut compiler camlp4 avec ocamlopt, et comment?


j'ai essayé de compiler l'example
-----------------------
camlp4foo.ml
-----------------------
let gram = Grammar.create (Plexer.make ());;
let expr = Grammar.Entry.create gram "expr" ;;


    EXTEND
    expr :
    [ [ x = expr; "+"; y = expr -> x + y

  | x = expr; "-"; y = expr -> x - y ]
  | [ x = expr; "*"; y = expr -> x * y
  | x = expr; "/"; y = expr -> x / y ]
  | [ x = INT -> int_of_string x
  | "("; e = expr; ")" -> e ] ]

    ;
  END;;
-----------------------
avec la commande
ocamlopt -I +camlp4 gramlib.cmxa camlp4foo.ml -o camlp4foo.opt
mais j'obtiens l'erreur
File "camlp4foo.ml", line 5, characters 9-10:
Syntax error
en correspondance de ce qui suit 'expr' et je me sens un peu en panne de 
documentation (comme d'habitude...)


Merci d'avance
Ernesto

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners