caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christian Rinderknecht <rinderkn@pst.polyspace.com>
To: Steve Stevenson <steve@cs.clemson.edu>
Cc: caml-list@inria.fr
Subject: Re: Multiple Yacc-style Parsers in one application?
Date: Mon, 26 Jun 2000 12:05:46 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.GSO.4.05.10006261152120.4171-100000@pst> (raw)
In-Reply-To: <14675.23674.237350.612515@merlin.cs.clemson.edu>

Hello Steve,

Last year I wrote in OCaml a software that had to deal with multiple
output/input files of a commercial tool, and hence needed up to six lexers
and parsers. The different formats were rather close (both lexically and
syntactically), but I wasn't able to share the lexers and the parsers
rules because:
  1) ocamllex generates an "open <Parser module name>" directive;
  2) ocamlyacc doesn't allow rule sharing.
Nevertheless, I shared a lot of semantic actions (defined in standalone
modules).

The first point could be solved if ocamllex produced a functor whose
argument signature would constrain the abstract syntax tree, but I am not
sure the underlying implementation of lexer buffers would then behave
soundly.

Best regards,


Christian

--------------------------------------------------------------------
Christian Rinderknecht          Christian.Rinderknecht@polyspace.com
PolySpace Technologies          Tel: 04.76.61.54.17
c/o INRIA                       Fax: 04.76.61.54.09
655, Av. de l'Europe            http://www.polyspace.com/
F-38330 Montbonnot St Martin

On Fri, 23 Jun 2000, Steve Stevenson wrote:

> I'm interested in hearing experiences from people who have used
> multiple yacc parsers in one application. I assume that they would
> share one lexer buffer (but maybe not). Do you have to manipulate the
> lexical world to deal with the one-lookahead?



      parent reply	other threads:[~2000-06-26 10:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-23 12:49 Steve Stevenson
2000-06-23 16:46 ` Chris Tilt
2000-06-26 10:05 ` Christian Rinderknecht [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=Pine.GSO.4.05.10006261152120.4171-100000@pst \
    --to=rinderkn@pst.polyspace.com \
    --cc=caml-list@inria.fr \
    --cc=steve@cs.clemson.edu \
    /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).