Browse thread
[Caml-list] otags problem
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Yaron M. Minsky <yminsky@c...> |
| Subject: | Re: [Caml-list] camlp4o problem (was: otags problem) |
I've found a similar oddity with respect to camlp4 and the % infix
operator. In particular:
dragonfly: yminsky $ ocaml
Objective Caml version 3.04
# #load "camlp4o.cma";;
Camlp4 Parsing version 3.04
# let ( % ) x y = x + y;;
val ( % ) : int -> int -> int = <fun>
# 3 % 4;;
Toplevel input:
# 3 % 4;;
^
Parse error: ';;' expected after [phrase] (in [top_phrase])
#
The above works normally if you don't load camlp4o first. Any clues as
to what might be going on?
y
On Tue, 2002-02-05 at 11:13, Daniel de Rauglaudre wrote:
> Hi,
>
> On Tue, Feb 05, 2002 at 04:08:21PM +0100, Hendrik Tews wrote:
>
> > I would like to have this flag.
>
> Ok, I added it:
>
> $ ocaml
> Objective Caml version 3.04+5 (2002-02-01)
>
> # #load "camlp4o.cma";;
> Camlp4 Parsing version 3.04+5 (2002-02-01)
>
> # let ( <:> ) x y = x + y;;
> Toplevel input:
> # let ( <:> ) x y = x + y;;
> ^
> Lexing error: character '<' expected
> # Plexer.no_quotations := true;;
> - : unit = ()
> # let ( <:> ) x y = x + y;;
>
> > Well, what I meant is that
> > - camlp4o parses a file if and only if ocamlc parses it, and
> > - the resulting ast's are semantically equivalent.
>
> And what I meant is:
> - this is impossible
> - I can just try to be as close as possible
>
> > Further there is no grammar for the revised syntax.
>
> BTW, is there a grammar for the normal syntax? I didn't find it in
> the documentation.
>
> With Camlp4, you can print the syntax of expressions by typing:
> Grammar.Entry.print Pcaml.expr
>
> Well, I am thinking of using this function to print the syntax of all
> grammar in LateX or HTML or so.
>
> --
> Daniel de RAUGLAUDRE
> daniel.de_rauglaudre@inria.fr
> http://cristal.inria.fr/~ddr/
> -------------------
> 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
>
--
|--------/ Yaron M. Minsky \--------|
|--------\ http://www.cs.cornell.edu/home/yminsky/ /--------|
Open PGP --- KeyID B1FFD916 (new key as of Dec 4th)
Fingerprint: 5BF6 83E1 0CE3 1043 95D8 F8D5 9F12 B3A9 B1FF D916
-------------------
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