caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin.jambon@ens-lyon.org>
To: Pietro Abate <Pietro.Abate@anu.edu.au>
Cc: caml-list@yquem.inria.fr, ocaml ml <caml-list@inria.fr>
Subject: Re: using camlp4 api [WAS: Re: [Caml-list] parsing problem.]
Date: Wed, 24 Jan 2007 14:37:39 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0701241426590.21415@localhost> (raw)
In-Reply-To: <20070124215329.GA17676@pulp.rsise.anu.edu.au>

On Thu, 25 Jan 2007, Pietro Abate wrote:

> where in the first part there is a grammar definition and in the second part
> the grammar is used to parse the argument of the match statement.
>
> my question: Is it possible to do something similar with camlp4 ?
>
> In the library documentation I can see that this might be possible, but I don't
> quite understand where to start. The first step should be to write a small
> parser to interpret the language definition and then to generate, by using the
> Grammar (extensible grammars) module, other production that extend the current
> grammar to parse the rest of the file. The trick part is that I cannot write (I
> think) and EXTEND statement on the fly (as it should be parsed itself), but I
> have to use the quotation library directly, and this is very verbose...
>
> Did anybody do anything similar ? One small example ?

No :-)

Take pa_extend.ml and unquote the quotations?
(and solve the type problems which might not be so bad)


Martin

--
Martin Jambon
http://martin.jambon.free.fr


  reply	other threads:[~2007-01-24 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23 23:59 parsing problem Pietro Abate
2007-01-24 21:53 ` using camlp4 api [WAS: Re: [Caml-list] parsing problem.] Pietro Abate
2007-01-24 22:37   ` Martin Jambon [this message]
2007-01-25  9:36     ` Nicolas Pouillard

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.LNX.4.58.0701241426590.21415@localhost \
    --to=martin.jambon@ens-lyon.org \
    --cc=Pietro.Abate@anu.edu.au \
    --cc=caml-list@inria.fr \
    --cc=caml-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).