Browse thread
camlp4 3.10 questions
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Hendrik Tews <H.Tews@c...> |
| Subject: | Re: [Caml-list] camlp4 3.10 questions |
"Nicolas Pouillard" <nicolas.pouillard@gmail.com> writes:
> 2. There are various maps and folds on asts in Sig.Camlp4Ast. How
> can I use them?
2/ There is a lot of shortcuts to made the use of them easier when one
just want to hook up only one thing (expressions for instance).
The same example.
open Camlp4.PreCast
let f = Ast.map_expr begin function
| <:expr< $x$ + 0 >> | <:expr< 0 + $x$ >> -> x
| e -> e
end in
AstFilters.register_str_item f#str_item
That should be AstFilters.register_str_item f ?
> 8. How can I process multiple files with the same camlp4 process?
As always ?
How is as always? Two files on the command line give the usage
info:
camlp4o printer.cmo test.ml printer.ml
Usage: camlp4 [load-options] [--] [other-options]
Options:
....
Thanks for all the answers,
Hendrik