Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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

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

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

[ 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