<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/07/6ff247057e1f23c1558a197c6adcfe70"
  from="Pietro Abate &lt;Pietro.Abate@a...&gt;"
  author="Pietro Abate"
  date="2003-07-08T16:55:59"
  subject="[Caml-list] camlp4 and eval..."
  prev="2003/07/14786d6aaf407cffe11e541113f6b25b"
  next="2003/07/696adf8dbd272ba10f46a00df7e80779"
  prev-thread="2003/07/f403c5aea2503d60d196e2a58761da75"
  next-thread="2003/07/fb3da633abcfdc3f4bbdc870d13140cb"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] camlp4 and eval...">
<msg 
  url="2003/07/6ff247057e1f23c1558a197c6adcfe70"
  from="Pietro Abate &lt;Pietro.Abate@a...&gt;"
  author="Pietro Abate"
  date="2003-07-08T16:55:59"
  subject="[Caml-list] camlp4 and eval...">
</msg>
</thread>

<contents>
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 -&gt;
		let e' = EVAL_MAGIC_FUNCTION e in
		let _ = store e' in
		&lt;:expr&lt;other_function $e$&gt;&gt;
	]
]

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

</contents>

</message>

