From: Hendrik Tews <tews@tcs.inf.tu-dresden.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] camlp4 help
Date: Wed, 20 Jul 2005 09:37:50 +0200 [thread overview]
Message-ID: <rlwtnmvsfl.fsf@ithif59.inf.tu-dresden.de> (raw)
In-Reply-To: <20050719052321.GA23096@pulp.anu.edu.au>
Pietro Abate <Pietro.Abate@anu.edu.au> writes:
However, for some reasons, it doesn't work as expected. The function test
correctly recognizes the string "-----" but then I get a Stream.Error from
nowhere ( guess from Grammar.Entry.of_parser ) and the parsin fails...
Your test function is _not_ an oracle that guards an camlp4
grammar rule. Instead test is kind of a parsing function itself.
Consequently, if parsing succeeds you have to discard some
tokens:
let test rex strm =
match Stream.peek strm with
| Some(_,s) when s =~ rex ->
prerr_endline "!!!!" ;
Stream.junk strm
| _ -> raise Stream.Failure
;;
#ocamlfind ocamlc -package str -c -pp "camlp4o -I . pa_extend.cmo q_MLast.cmo " -I /usr/lib/ocaml/3.08.3/camlp4 te.ml
I've never used ocamlfind, but why not
ocamlfind ocamlc -package str -c -pp "camlp4o pa_extend.cmo q_MLast.cmo " \
-I +camlp4 te.ml
(deleted "-I ." and use "-I +camlp4") ?
Bye,
Hendrik
next prev parent reply other threads:[~2005-07-20 7:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-15 8:39 Pietro Abate
2005-07-15 20:24 ` [Caml-list] " Martin Jambon
2005-07-18 10:12 ` Hendrik Tews
2005-07-19 5:23 ` Pietro Abate
2005-07-20 7:37 ` Hendrik Tews [this message]
2005-07-20 9:57 ` Gerd Stolpmann
2009-03-21 3:41 Camlp4 help Andre Nathan
2009-03-21 15:26 ` [Caml-list] " blue storm
2009-03-21 16:14 ` Andre Nathan
2009-03-21 17:24 ` blue storm
2009-03-21 17:26 ` blue storm
2009-04-13 0:05 Andre Nathan
2009-04-13 19:08 ` [Caml-list] " Andre Nathan
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=rlwtnmvsfl.fsf@ithif59.inf.tu-dresden.de \
--to=tews@tcs.inf.tu-dresden.de \
--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