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
parser syntax?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-01 (22:23)
From: Matt Gushee <matt@g...>
Subject: Re: [Caml-list] parser syntax?
Jonathan Roewen wrote:

>> So what's the command line I need to compile source with 'parser' syntax?

I think

  ocamlc -pp camlp4o -c mysource.ml

should be sufficient. In some cases you might need to load additional
Camlp4 modules, in which case you'd do something like:

  ocamlc -pp 'camlp4o foo.cmo' -c mysource.ml

E.g., a commonly-used set for when you write your own syntax extensions is:

  ocamlc -pp 'camlp4o pa_extend.cmo q_MLast.cmo' -c mysource.ml

[ Pa_extend parses the grammar extension syntax, and Q_MLast processes
  quotation expanders to generate an AST. ]

But that's not what you're doing, so try the simplest version first.

Matt Gushee
Englewood, CO, USA