Findfirst / findnext Caml equivalents

From: Remi VANICAT (vanicat@labri.u-bordeaux.fr)
Date: Fri Dec 03 1999 - 15:32:00 MET


To: Georges Mariano <georges.mariano@inrets.fr>
Subject: Re: "nested" parsers
From: Remi VANICAT <vanicat@labri.u-bordeaux.fr>
In-Reply-To: Georges Mariano's message of "Thu, 02 Dec 1999 13:25:04 +0000"
Date: 03 Dec 1999 15:32:00 +0100

Georges Mariano <georges.mariano@inrets.fr> writes:

> Hello everyone,
>
> We have developed a parser for a language L using ocamllex
> and ocamlyacc , thus we have a L.mly
>
> It appears that we can divide the language L in a few "sub"-languages.
> Let's say that L3 <: L2 <: L1 = L ('<:' included in )
>
> And we would like to have one entry point for each language
> in our parser.
> a) is it possible (i.e with ocamlyacc) ?
> (with one .mly, with several ??)
>
> b) how to do that ? (it's not very clear for us ;-)
> (pointers to specifica documentation or examples are
> welcome...)

i am not sure of what you want, but you have this in the
documentation:

%start symbol ...  symbol
          Declare the given symbols as entry points for the
          grammar. For each entry point, a parsing function with the
          same name is defined in the output module. Non-terminals
          that are not declared as entry points have no such parsing
          function. Start symbols must be given a type with the %type
          directive below.

so for each sub-languages you mai put the corresponding symbol in the
start close



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:29 MET