Re: [Caml-list] Camlp4 generate more than one (compiled) files?

2008-10-17 Thread Conglun Yao
Rich, Thanks for your reply. What you mentioned in your blog: In fact saving the AST into the cmo file is relatively simple: we just turn it into a string (using Marshal) and write out the string as a camlp4 substitution: let bitmatch ext2sb = { ... } becomes: let ext2sb = "" If I understand c

Re: [Caml-list] Camlp4 generate more than one (compiled) files?

2008-10-17 Thread Richard Jones
On Fri, Oct 17, 2008 at 12:15:08PM +0100, Conglun Yao wrote: > I'm just wondering is it possible to use camlp4 to generate more than > one compiled files. > Normally, camlp4 preprocesses a file and then pass it directly to > compiler (for *.cmo), or its pretty-printer (for *.ml or other > 'plain'

[Caml-list] Camlp4 generate more than one (compiled) files?

2008-10-17 Thread Conglun Yao
Dear all, I'm just wondering is it possible to use camlp4 to generate more than one compiled files. Normally, camlp4 preprocesses a file and then pass it directly to compiler (for *.cmo), or its pretty-printer (for *.ml or other 'plain' file). In my case, I want to extend the syntax, and write a