caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Joel Reymont <joelr1@gmail.com>
To: Caml List <caml-list@inria.fr>
Cc: menhir-list@yquem.inria.fr
Subject: Sharing a symbol table between a lexer and a Menhir parser
Date: Tue, 1 May 2007 18:56:57 +0100	[thread overview]
Message-ID: <4976BD71-831B-47D0-A5FD-6E449EFBBFEE@gmail.com> (raw)

Would someone kindly show me an example of how to do this?

Assuming that my parser function looks like this

let parse str =
   Symtab.reset ();
   let lexbuf = Lexing.from_string str in
   Easy_parser.program Easy_lexer.token lexbuf

I would like to give Easy_lexer.token the same symbol table that was  
used to specialize the parser functor.

I would this hard to impossible for some reason.

	Thanks, Joel

--
http://wagerlabs.com/






                 reply	other threads:[~2007-05-01 17:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4976BD71-831B-47D0-A5FD-6E449EFBBFEE@gmail.com \
    --to=joelr1@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=menhir-list@yquem.inria.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).