To: Georges Mariano <firstname.lastname@example.org>
Subject: Re: "nested" parsers
From: Remi VANICAT <email@example.com>
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 <firstname.lastname@example.org> 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
i am not sure of what you want, but you have this in the
%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
so for each sub-languages you mai put the corresponding symbol in the
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:29 MET