| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Introducing Dokkio, a new service from the creators of PBworks. Find and manage the files you've stored in Dropbox, Google Drive, Gmail, Slack, and more. Try it for free today.

View
 

Camlp4 tricks

Page history last edited by PBworks 13 years, 7 months ago

This is a place to share tips and tricks about Camlp4.

 

AST to string conversion

 

This message from Daniel de Rauglaudre on caml-list explains how to convert a syntax node into a string, like pr_o.cmo or pr_r.cmo do.

 

Basically, pretty-printing an expr e goes like this:

Pcaml.string_of Pcaml.pr_expr e

The Pr_o (or Pr_r) module has to be linked in.

Comments (0)

You don't have permission to comment on this page.