caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <alain@frisch.fr>
To: Nicolas Bros <nicolas.bros@gmail.com>, caml-list@inria.fr
Subject: Re: [Caml-list] OCalDE
Date: Wed, 25 Jul 2007 11:24:29 +0200	[thread overview]
Message-ID: <46A716CD.6070307@frisch.fr> (raw)
In-Reply-To: <4fbf351c0707250027t33c80ef1gc57f686ef9cfb376@mail.gmail.com>

Nicolas Bros wrote:
>> How can I tell eclipse parser about my own camlp4 extension ?
> 
> For now, you can't. OcaIDE uses a custom parser written in Java,
> copied from the rules of the original Ocaml parser. So, it only parses
> standard syntax.
> To parse a modified syntax, the file would first have to be processed
> by camlp4.
> But then, how would OcaIDE get the positions of the elements in the
> original unprocessed file?

Camlp4 makes this information available when it dumps a binary version 
of the Caml AST. If the problem is to read this marshaled value, it 
should not be too difficult to write another printer for Camlp4 (e.g. 
xml-ish, json-ish or lisp-ish, dependening on what is easier to parse in 
OcaIDE).


-- Alain


  parent reply	other threads:[~2007-07-25  9:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 16:21 OCalDE Christophe Raffalli
2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
2007-07-25  7:41   ` Christophe Raffalli
2007-07-25  9:24   ` Alain Frisch [this message]
2007-07-25 15:32     ` Nicolas Bros
2007-07-25  9:33   ` Jon Harrop
2007-07-31 11:22 ` Nicolas Bros
2007-07-25 12:30 Re : " Matthieu Wipliez
2007-07-26 16:47 ` Jon Harrop
2007-07-27  7:18   ` Nicolas Bros

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=46A716CD.6070307@frisch.fr \
    --to=alain@frisch.fr \
    --cc=caml-list@inria.fr \
    --cc=nicolas.bros@gmail.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;
as well as URLs for NNTP newsgroup(s).