From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 26A69BC37 for ; Sat, 18 Jul 2009 01:18:07 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArQLAMOjYEpQDPJkW2dsb2JhbACCJS+WehcICwcSBrZRhAwFgUA X-IronPort-AV: E=Sophos;i="4.43,224,1246831200"; d="asc'?scan'208,217";a="33196575" Received: from smtp28.orange.fr ([80.12.242.100]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Jul 2009 01:18:06 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2809.orange.fr (SMTP Server) with ESMTP id 246777000088 for ; Sat, 18 Jul 2009 01:18:06 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2809.orange.fr (SMTP Server) with ESMTP id 184FD7000089 for ; Sat, 18 Jul 2009 01:18:06 +0200 (CEST) Received: from [192.168.1.2] (LAubervilliers-153-53-1-14.w217-128.abo.wanadoo.fr [217.128.128.14]) by mwinf2809.orange.fr (SMTP Server) with ESMTP id DC13D7000088 for ; Sat, 18 Jul 2009 01:18:05 +0200 (CEST) X-ME-UUID: 20090717231805901.DC13D7000088@mwinf2809.orange.fr Subject: Ocamlfind with camlp4r. From: Serge Leblanc To: caml-list@yquem.inria.fr Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-FgyPY2NoeqPMib42OmZE" Date: Sat, 18 Jul 2009 01:18:09 +0200 Message-Id: <1247872689.4422.135.camel@serge2> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 X-Spam: no; 0.00; ocamlfind:01 camlp:01 ocamlfind:01 buf:01 buffer:01 buf:01 ocamlc:01 -pp:01 camlp:01 lib:01 ocamlc:01 -package:01 -linkpkg:01 expr:01 infix:01 X-Attachments: cset="utf-8" type="application/pgp-signature" name="signature.asc" --=-FgyPY2NoeqPMib42OmZE Content-Type: multipart/alternative; boundary="=-zkc3OQf74pI8dowd8MIi" --=-zkc3OQf74pI8dowd8MIi Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I don't understand what is wrong with Ocamlfind. Does someone can help me ? echo "value store buf s =3D 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 =3D 066C 005F 5595 D85C 7673 D969 1DD4 90C4 3324 3C1B --=-zkc3OQf74pI8dowd8MIi Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable I don't understand what is wrong with Ocamlfind. Does someone can help me ?=

echo "value store buf s =3D do { Buffer.add_string buf s ; buf } ;&quo= t; > 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 op= erators, and some others)] (in [expr])
Preprocessor error

--
Serge Leblanc
gpg --keyserver  hkp://keyserver.ubuntu.com:11= 371 --recv-keys 0x33243C1B
Fingerprint =3D 066C 005F 5595 D85C 7673  D969= 1DD4 90C4 3324 3C1B
--=-zkc3OQf74pI8dowd8MIi-- --=-FgyPY2NoeqPMib42OmZE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkphBpsACgkQHdSQxDMkPBt1agCeOOVVSSbQ69uRYw6hZ6+AB3WC U8kAnjYCSCRdGIZeVuJ+CSJVzGzJQimx =WSTj -----END PGP SIGNATURE----- --=-FgyPY2NoeqPMib42OmZE-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id B6E62BC37 for ; Sat, 18 Jul 2009 11:10:19 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AugCAEcuYUrRVdrai2dsb2JhbACPAIoYPwEBAQoJDAcSohyBG5BNAQMCBIQIBYFA X-IronPort-AV: E=Sophos;i="4.43,225,1246831200"; d="scan'208";a="29986266" Received: from mail-bw0-f218.google.com ([209.85.218.218]) by mail2-smtp-roc.national.inria.fr with ESMTP; 18 Jul 2009 11:10:19 +0200 Received: by bwz18 with SMTP id 18so1115754bwz.27 for ; Sat, 18 Jul 2009 02:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=4DMQZnwUR4c5kL5Tn5AGTJ+yJB4K4s1JQNM4y/0bO9M=; b=K/M8m0sSbfJRnHKzOpURjldGVITIy2z3ndeeJ4MyrMc1JMGe+dcpr1WrAYIdI17dkL 0LYfGiuetUFap1pU3H49f/LV/Tp64pCKkebENHh/LlXqS4D0l4VvTPfdqBLCW6E9KExZ JeQ65BNa6npISofroltsV4vz7r51NGBR7PGyY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=OGg+69KjzoE3VcXmGLmhxrbAZ4pFIp87G6xf8GjAIX4shoamwjloLh2xn9DDbRye6t pt1bCrk6jpNa7Xsh3d5Xu1CsB6QSDsBt29EhB9bH0f3rukF0vNOPneihy2c3eDQbp0CO VQ4RowfQrEXSlYSF7kKzLjQUuAidpocP+mH5c= MIME-Version: 1.0 Received: by 10.204.62.135 with SMTP id x7mr1857736bkh.95.1247908218874; Sat, 18 Jul 2009 02:10:18 -0700 (PDT) In-Reply-To: <1247872689.4422.135.camel@serge2> References: <1247872689.4422.135.camel@serge2> Date: Sat, 18 Jul 2009 11:10:18 +0200 Message-ID: <527cf6bc0907180210q10f78309o278d426e6eb1957d@mail.gmail.com> Subject: Re: [Caml-list] Ocamlfind with camlp4r. From: blue storm To: Serge Leblanc Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocamlfind:01 camlp:01 subtleties:01 -pp:01 camlp:01 ocamlfind:01 ocamlc:01 -pp:01 -linkpkg:01 buf:01 buffer:01 buf:01 ocamlc:01 lib:01 -package:01 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 wro= te: > I don't understand what is wrong with Ocamlfind. Does someone can help me= ? > > echo "value store buf s =3D do { Buffer.add_string buf s ; buf } ;" > tes= t.ml > ocamlc -o test -pp "camlp4r" -I +camlp4 camlp4lib.cma ./test.ml > ocamlfind ocamlc -o test -package "camlp4" -linkpkg=A0 -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=A0 hkp://keyserver.ubuntu.com:11371 --recv-keys 0x33243C1= B > Fingerprint =3D 066C 005F 5595 D85C 7673=A0 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.7 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 441C2BC37 for ; Sat, 18 Jul 2009 18:36:14 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAFAJOWYUrRVd67c2dsb2JhbACZGD8BDAoLBxMDomWPdwEDAgSECAWBQIZB X-IronPort-AV: E=Sophos;i="4.43,227,1246831200"; d="scan'208";a="29995756" Received: from mail-pz0-f187.google.com ([209.85.222.187]) by mail2-smtp-roc.national.inria.fr with ESMTP; 18 Jul 2009 18:36:13 +0200 Received: by pzk17 with SMTP id 17so1161947pzk.1 for ; Sat, 18 Jul 2009 09:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=6eEJSMBBPfpCFY21lpFdqfDF9WIAG57vzJIew3su14g=; b=oNjP2I8NOfW1MRM+ef+TdhtceBeew5eUO68WPFFmU7YppFHTkPsiLX7XscMX7GpUMw CiW+jFtOENIEGUIkmcMFv7ACWGdDF3059SDxYT5HDeXyGzzIOrYXAntLoHlWbT2PjPDI JyCmC+YmAi5iu7cb/nNzltNqwfdztgmNm9l2o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=jCruxWvMELBV094kcnNEzaArG9RThiF3cNTPdUtoaRG9Z5AOnkmmGsFM/VxZAIC+3M 8tiAjklp8UllxFiLFk/LMEW3MNa3NzcRDjImWxslKbG2Ux4n80OZzBEHd8WMU170pU4L axuSFcAFY63dticPTq8BRu1ECE5tM2FdcHAZE= MIME-Version: 1.0 Sender: jake.donham@gmail.com Received: by 10.142.84.3 with SMTP id h3mr744354wfb.120.1247934972131; Sat, 18 Jul 2009 09:36:12 -0700 (PDT) In-Reply-To: <1247872689.4422.135.camel@serge2> References: <1247872689.4422.135.camel@serge2> From: Jake Donham Date: Sat, 18 Jul 2009 09:35:52 -0700 X-Google-Sender-Auth: da40cbf7e055a159 Message-ID: Subject: Re: [Caml-list] Ocamlfind with camlp4r. To: Serge Leblanc Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocamlfind:01 camlp:01 ocamlfind:01 ocamlc:01 -package:01 camlp:01 -linkpkg:01 -verbose:01 ocamlc:01 parsers:01 syntax:01 2009:98 wrote:01 caml-list:01 breaks:02 On Fri, Jul 17, 2009 at 4:18 PM, Serge Leblanc wro= te: > ocamlfind ocamlc -o test -package "camlp4" -linkpkg=A0 -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