caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Isaac Freeman" <memotype@gmail.com>
To: caml-list@yquem.inria.fr
Subject: camlp4 and streams
Date: Sun, 13 May 2007 11:58:32 -0400	[thread overview]
Message-ID: <6ff764650705130858s7bbc2263sc3d99ed9e8a4760c@mail.gmail.com> (raw)

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


             reply	other threads:[~2007-05-13 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-13 15:58 Isaac Freeman [this message]
2007-05-13 20:28 ` [Caml-list] " Nicolas Pouillard

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=6ff764650705130858s7bbc2263sc3d99ed9e8a4760c@mail.gmail.com \
    --to=memotype@gmail.com \
    --cc=caml-list@yquem.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).