caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* camlp4 and streams
@ 2007-05-13 15:58 Isaac Freeman
  2007-05-13 20:28 ` [Caml-list] " Nicolas Pouillard
  0 siblings, 1 reply; 2+ messages in thread
From: Isaac Freeman @ 2007-05-13 15:58 UTC (permalink / raw)
  To: caml-list

Hello,

I am having some problems using streams in my camlp4 extentions. The code:

EXTEND
  expr: LEVEL "expr1"
    [[ "yield"; e1 = expr LEVEL "simple";
       "continue"; e2 = expr LEVEL "simple" ->
          <:expr< [< $e1$; $e2$ >] >> ]];
END;;

produces the error:

isaac@lappy:~/stuff/ocaml$ ocamlc -pp "camlp4o pa_extend.cmo
q_MLast.cmo" -I +camlp4 -c gen-syntax.ml
File "gen-syntax.ml", line 8, characters 18-20:
While expanding quotation "expr":
Parse error: illegal begin of expression
Uncaught exception: Pcaml.Qerror("expr", 1, _)
Preprocessor error

However, when I change the stream into a list, it works fine, so I'm
sure there is just some technicality in using streams here that I'm
not accounting for properly. Any ideas?

Thanks,
Isaac

-- 
James "Isaac" Freeman
memotype (at) gmail.com


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

end of thread, other threads:[~2007-05-13 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-13 15:58 camlp4 and streams Isaac Freeman
2007-05-13 20:28 ` [Caml-list] " Nicolas Pouillard

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