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

  • Social distancing? Try a better way to work remotely on your online files. Dokkio, a new product from PBworks, can help your team find, organize, and collaborate on your Drive, Gmail, Dropbox, Box, and Slack files. Sign up for free.

View
 

Camlp4 tricks

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