caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Ocamlfind with camlp4r.
@ 2009-07-17 23:18 Serge Leblanc
  2009-07-18  9:10 ` [Caml-list] " blue storm
  2009-07-18 16:35 ` Jake Donham
  0 siblings, 2 replies; 3+ messages in thread
From: Serge Leblanc @ 2009-07-17 23:18 UTC (permalink / raw)
  To: caml-list


[-- Attachment #1.1: Type: text/plain, Size: 648 bytes --]

I don't understand what is wrong with Ocamlfind. Does someone can help
me ?

echo "value store buf s = do { Buffer.add_string buf s ; buf } ;" >
test.ml
ocamlc -o test -pp "camlp4r" -I +camlp4 camlp4lib.cma ./test.ml
ocamlfind ocamlc -o test -package "camlp4" -linkpkg  -syntax
"camlp4r" ./test.ml
File "./test.ml", line 1, characters 16-17:
Parse error: [expr] expected after [infix operator (level 0) (comparison
operators, and some others)] (in [expr])
Preprocessor error

--
Serge Leblanc
gpg --keyserver  hkp://keyserver.ubuntu.com:11371 --recv-keys 0x33243C1B
Fingerprint = 066C 005F 5595 D85C 7673  D969 1DD4 90C4 3324 3C1B

[-- Attachment #1.2: Type: text/html, Size: 1204 bytes --]

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Ocamlfind with camlp4r.
  2009-07-17 23:18 Ocamlfind with camlp4r Serge Leblanc
@ 2009-07-18  9:10 ` blue storm
  2009-07-18 16:35 ` Jake Donham
  1 sibling, 0 replies; 3+ messages in thread
From: blue storm @ 2009-07-18  9:10 UTC (permalink / raw)
  To: Serge Leblanc; +Cc: caml-list

I don't understand the subtleties of the "-syntax" option, but using
"-pp camlp4r" instead works fine :
Besides, the camlp4 package isn't necessary if your code doesn't use
any of the camlp4 libraries (or quotations/whatever).

$ ocamlfind ocamlc -o test -pp camlp4r -linkpkg ./test.ml

On Sat, Jul 18, 2009 at 1:18 AM, Serge Leblanc<serge.leblanc@orange.fr> wrote:
> I don't understand what is wrong with Ocamlfind. Does someone can help me ?
>
> echo "value store buf s = do { Buffer.add_string buf s ; buf } ;" > test.ml
> ocamlc -o test -pp "camlp4r" -I +camlp4 camlp4lib.cma ./test.ml
> ocamlfind ocamlc -o test -package "camlp4" -linkpkg  -syntax "camlp4r"
> ./test.ml
> File "./test.ml", line 1, characters 16-17:
> Parse error: [expr] expected after [infix operator (level 0) (comparison
> operators, and some others)] (in [expr])
> Preprocessor error
>
> --
> Serge Leblanc
> gpg --keyserver  hkp://keyserver.ubuntu.com:11371 --recv-keys 0x33243C1B
> Fingerprint = 066C 005F 5595 D85C 7673  D969 1DD4 90C4 3324 3C1B
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Ocamlfind with camlp4r.
  2009-07-17 23:18 Ocamlfind with camlp4r Serge Leblanc
  2009-07-18  9:10 ` [Caml-list] " blue storm
@ 2009-07-18 16:35 ` Jake Donham
  1 sibling, 0 replies; 3+ messages in thread
From: Jake Donham @ 2009-07-18 16:35 UTC (permalink / raw)
  To: Serge Leblanc; +Cc: caml-list

On Fri, Jul 17, 2009 at 4:18 PM, Serge Leblanc<serge.leblanc@orange.fr> wrote:
> ocamlfind ocamlc -o test -package "camlp4" -linkpkg  -syntax "camlp4r" ./test.ml

It's useful to add the -verbose option (after ocamlc) to see what
options are passed to camlp4. In this case it's getting the -rp
option, which is apparently
(http://brion.inria.fr/gallium/index.php/Using_Camlp4) the extension
for writing parsers in the revised syntax. Not sure why that breaks
your program, or why Ocamlfind includes it with -syntax camlp4r.

Jake


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-18 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-17 23:18 Ocamlfind with camlp4r Serge Leblanc
2009-07-18  9:10 ` [Caml-list] " blue storm
2009-07-18 16:35 ` Jake Donham

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).