Skip to content
nbros edited this page Sep 13, 2010 · 2 revisions

compile with -cflags:

-I +parsing -I +camlp4

Camlp4 AST in Camlp4Ast.partial.ml
OCaml AST in parsetree.mli

Camlp4 AST contains locations for (almost) all elements, whereas OCaml AST only has some location info.

dump OCaml AST:

camlp4 -parser Ocaml -printer Camlp4OcamlAstDumper test.ml > test.ast

dump Camlp4 AST:

camlp4 -parser Ocaml -printer Camlp4AstDumper test.ml > test.ast

Clone this wiki locally