caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Camlp4 and [@@ attributes
@ 2015-02-18  8:07 Maxence Guesdon
  2015-02-18  8:54 ` Peter Zotov
  0 siblings, 1 reply; 2+ messages in thread
From: Maxence Guesdon @ 2015-02-18  8:07 UTC (permalink / raw)
  To: caml-list

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

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

* Re: [Caml-list] Camlp4 and [@@ attributes
  2015-02-18  8:07 [Caml-list] Camlp4 and [@@ attributes Maxence Guesdon
@ 2015-02-18  8:54 ` Peter Zotov
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zotov @ 2015-02-18  8:54 UTC (permalink / raw)
  To: Maxence Guesdon; +Cc: caml-list, caml-list-request

On 2015-02-18 11:07, Maxence Guesdon wrote:
> Is there a special invocation of camlp4 to make it accept the [@@
> syntax ?

No. https://github.com/ocaml/camlp4/issues/55

-- 
Peter Zotov

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

end of thread, other threads:[~2015-02-18  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18  8:07 [Caml-list] Camlp4 and [@@ attributes Maxence Guesdon
2015-02-18  8:54 ` Peter Zotov

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