* [Caml-list] camlp4 and eval...
@ 2003-07-08 16:56 Pietro Abate
0 siblings, 0 replies; only message in thread
From: Pietro Abate @ 2003-07-08 16:56 UTC (permalink / raw)
To: caml-list
Hi all,
I'm trying to write a a cp4 extension that evals and use a
parsed value during the parsing process... in symbols my problem
looks like :
let h = Hashtbl.create 10
let store l = Hashtbl.add h l
expr:
[
[ "keyword"; e = expr ->
let e' = EVAL_MAGIC_FUNCTION e in
let _ = store e' in
<:expr<other_function $e$>>
]
]
I don't want to write something like "["; e = LIST1 int SEP ";"; "]"
because I want to maintain the flexibility to accept a function or a
LIDENT instead that hard wired a list definition...
what's the magic function that gives me back an expression that I can
use in the extension context ? Does this function exist or I'm mixing
everything again ?
tnx,
p
--
Civilization advances by extending the number
of important operations which we can perform
without thinking. (Alfred North Whitehead)
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-07-08 16:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-08 16:56 [Caml-list] camlp4 and eval Pietro Abate
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox