caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Remi VANICAT <vanicat@labri.u-bordeaux.fr>
To: Georges Mariano <georges.mariano@inrets.fr>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: "nested" parsers
Date: 03 Dec 1999 15:32:00 +0100	[thread overview]
Message-ID: <ya3k8mw9jtr.fsf@serveur2-1.labri.u-bordeaux.fr> (raw)
In-Reply-To: Georges Mariano's message of "Thu, 02 Dec 1999 13:25:04 +0000"

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




      parent reply	other threads:[~1999-12-03 18:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-02 13:25 Georges Mariano
1999-12-03 13:31 ` Hendrik Tews
1999-12-03 18:18   ` skaller
1999-12-03 14:32 ` Remi VANICAT [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ya3k8mw9jtr.fsf@serveur2-1.labri.u-bordeaux.fr \
    --to=vanicat@labri.u-bordeaux.fr \
    --cc=caml-list@inria.fr \
    --cc=georges.mariano@inrets.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).