caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Maxence Guesdon <Maxence.Guesdon@inria.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Camlp4 and [@@ attributes
Date: Wed, 18 Feb 2015 09:07:54 +0100	[thread overview]
Message-ID: <20150218090754.10540421@alcazar2> (raw)

Hello,

On the following example (in p4.ml):

  type t = Foo [@@attribute blabla]

the following command fails due to camlp4 not handling [@@ attributes:

$ ocamlfind ocamlc -package js_of_ocaml.syntax -syntax camlp4o p4.ml
File "p4.ml", line 1, characters 9-12:
Parse error: [semi] expected after [str_item] (in [implem])
File "p4.ml", line 1:
Error: Error while running external preprocessor
Command line: camlp4 '-I' '/home/guesdon/.opam/4.02.1/lib/ocaml/camlp4'
'-I' '/home/guesdon/.opam/4.02.1/lib/js_of_ocaml' '-parser' 'o'
'-parser' 'op' '-printer' 'p' 'pa_js.cmo'  'p4.ml' > /tmp/ocamlpp1dd80a

Is there a special invocation of camlp4 to make it accept the [@@
syntax ?

Maxence

             reply	other threads:[~2015-02-18  8:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18  8:07 Maxence Guesdon [this message]
2015-02-18  8:54 ` Peter Zotov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150218090754.10540421@alcazar2 \
    --to=maxence.guesdon@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).