Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] otags problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Shivkumar Chandrasekaran <shiv@e...>
Subject: Re: [Caml-list] camlp4o problem (was: otags problem)
Thanks for all that info! I was planning to use camlp4. Looks like now 
is a good time to learn. Some simple syntax extensions would make my 
code so much more readable (aka Matlab-like). Thanks,

--shiv--

On Monday, February 4, 2002, at 06:11 AM, Hendrik Tews wrote:

> The problem is that otags uses camlp4o to parse the ocaml sources.
> Sometimes camlp4o is different from ocaml. You just hit one of
> these cases:
>
>     ithif51 ocaml 15> ledit ocaml
> 	    Objective Caml version 3.04
>
>     # let ( <:> ) x y = x + y;;
>     val ( <:> ) : int -> int -> int = <fun>
>     # #load "camlp4o.cma";;
> 	    Camlp4 Parsing version 3.04
>
>     # let ( <:> ) x y = x + y;;
>     Toplevel input:
>     # let ( <:> ) x y = x + y;;
> 	      ^
>     Lexing error: character '<' expected
>
> This difference seems to be a feature: in camlp4 "<:" starts a
> quotation. The only solutions that I see are the following:
>
> - use an infix operator that works in ocaml and in camlp4
> - rewrite otags ;-)
>
> For Daniel de Rauglaudre: Because normal ocaml users are now
> sometimes requested to use camlp4o for parsing (for instance for
> streams) I think it makes sense to provide a camlp4 parser that
> is _exacly_ ocaml. Maybe by placing the quotation syntax in a
> separate file, say pa_q.cmo?
>
>
> Bye,
>
> Hendrik
> -------------------
> Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: 
> http://caml.inria.fr/FAQ/
> To unsubscribe, mail caml-list-request@inria.fr  Archives: 
> http://caml.inria.fr
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr