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

  • Finally, you can manage your Google Docs, uploads, and email attachments (plus Dropbox and Slack files) in one convenient place. Claim a free account, and in less than 2 minutes, Dokkio (from the makers of PBworks) can automatically organize your content for you.

View
 

Camlp4 tricks

Page history last edited by PBworks 14 years, 9 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.