Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-07-25 (09:24)
From: Alain Frisch <alain@f...>
Subject: Re: [Caml-list] OCalDE
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 

-- Alain