From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: jon <jon@ffconsultancy.com>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] camlp4 and quotations for c#: Two parsers needed?
Date: Mon, 28 Jan 2008 15:34:18 +0100 [thread overview]
Message-ID: <1201530780-sup-5817@ausone.inria.fr> (raw)
In-Reply-To: <200801281058.19602.jon@ffconsultancy.com>
Excerpts from jon's message of Mon Jan 28 11:58:19 +0100 2008:
> On Monday 28 January 2008 10:59:15 Joel Reymont wrote:
> > I would like to introduce statements in C# into my OCaml code and have
> > camlp4 convert them to my C# AST at compile time. I would also like to
> > reuse the same parser used by camlp4 to parser regular C# files.
> >
> > Is it possible to share a parser this way or do I need a special
> > parser for quotations and another parser to read C# files?
>
> Camlp4's lexer is undocumented so its utility here is limited. I suspect it
> would be easier overall to simply forget all of that and manipulate ML-style
> raw ASTs.
There is nothing wrong with the Camlp4's *lexer*, it's simple generic and reusable.
However I confess that parsers can be a lot more complex.
--
Nicolas Pouillard aka Ertai
next prev parent reply other threads:[~2008-01-28 14:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 10:59 Joel Reymont
2008-01-28 10:58 ` [Caml-list] " Jon Harrop
2008-01-28 14:34 ` Nicolas Pouillard [this message]
2008-05-01 21:25 ` Richard Jones
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=1201530780-sup-5817@ausone.inria.fr \
--to=nicolas.pouillard@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=jon@ffconsultancy.com \
/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