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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-07-10 (09:27)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] sequence parser, revised syntax

On Mon, Jul 09, 2007 at 09:22:32AM -0500, wrote:

>   $ make stdlibr.cmo
>   ocamlc -pp "camlp4r pa_extend.cmo q_MLast.cmo" \
>           -I +camlp4 -c
>   File "", line 20, characters 40-48:
>   Unbound value Pcaml.sequence
>   make: *** [stdlibr.cmo] Error 2

Some of the grammar sub-entries used in the files defining the syntax
(e.g. "sequence") are indeed not accessible in the Pcaml module.

The problem is that there are many of them, many small entries useful
only in specifics parts of the grammar.

These small entries may change, appear, disappear, from a version of
camlp4 to another when new things are added in the language syntax, or
to fix possible bugs. It is often difficult to "standardize" them.

Moreover, some of these entries may be used in revised syntax and not
in normal syntax and vice-versa, or have a different type and semantics.

The solution is to rewrite, yourself, the missing entry in your sources.
You can see how "sequence" is implemented in the revised syntax and copy
it (it is short).

Perhaps the function Grammar.Entry.print should show differently the
"accessible" entries and the "non accessible" ones. I am going to see
if it is possible to implement that.

Daniel de Rauglaudre