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 (07:41)
From: Christophe Raffalli <Christophe.Raffalli@u...>
Subject: Re: [Caml-list] OCalDE
Nicolas Bros a écrit :
>> 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?
You could take the same approach than proof general for eclipse, writte 
a parser with anything (this includes camlp4)
whose output is a copy of the original file with xml annotation. Such a 
parser should allow camlp4 extension ...

The main problem, is that appart from the xml annotation the text should 
not be changed, so a camlp4 pretty-printer will not workd. However, the 
parser could simply produce the position where to add xml annotation 
that are inserter in a second phase into the original
input ...

So what needs to be written is a camlp4 parser that produce pairs with 
positions and xml annotation ... and that also perform a little error 
recovery ...
>> No progress about the darcs incompatibility related to "linked URLs" 
>> used by OCaIDE
>> and not supported by darcs eclipse.
> I think this is more of a problem with darcs than with OcaIDE.
Yes, probably, but what is a "linked URL" and what is their use in 
OCaIDE ? If it is the link to the ocaml library, then
it is strange that darcs think linked URL matters ?