camlp4 Questions

4

Solved

I'd like to be able to get the AST for a given OCaml program (I'd like to walk the AST and generate an instrumented version of the code or do some kind of transformation, for example). Do any of th...
Talented asked 29/6, 2010 at 20:50

1

Solved

Recently, it was announced in OCaml official github that Camlp4 is replaced by ppx rewriters and extension points (https://github.com/ocaml/camlp4): Camlp4 was part of the official OCaml distrib...
Sinatra asked 14/6, 2016 at 11:19

2

I want to analysis OCaml files (.ml) using OCaml. I want to break the files into Abstract Syntax Trees for analysis. I have attempted to use camlp4 but have had no luck. Has anyone else successfull...
Roving asked 23/4, 2014 at 2:15

1

Solved

There was a proposal from Alain Frisch of Lexifi over a year ago for an alternative to camlp4 for writing sytnax extensions making use of the -ppx flag added in OCaml 4.00. At that time he mentione...
Solothurn asked 10/10, 2013 at 23:13

0

I have been developing a parser for a tiny language whose syntax is the following P::= 1 | 0 | P+P | P and P | P wait(d) P Here is the code that i have written in Ocaml camlp4 action: [ ["ac...
Tallahassee asked 11/9, 2013 at 10:28

4

Solved

I have seen some source code having let rec parse_document = parser | [< len = parse_int32; st; >] -> parse_list [] (ES.take_int32 len st) | [< >] -> malformed "parse_documen...
Markswoman asked 22/4, 2013 at 14:54

1

Using the sexplib syntax extension to automatically generate serialization code for a type, as shown in many simple examples online: open Sexplib type t = { foo : int; bar : string; } with sexp le...
Mercenary asked 21/6, 2012 at 17:21

2

I'm using camlp4.macro to enable conditional compilation. I'm having problems informing OCamlbuild that certain files tagged with "use_jscore" must be preprocessed with a given camlp4 option. Here'...
Unlearn asked 18/4, 2012 at 14:18

1

Solved

I don't know how to accomplish this in general, but I'll ask about one instance in particular for clarity: Sexplib looks interesting to me. I want to play around with it. I've downloaded it, insta...
Ecliptic asked 15/9, 2011 at 22:52

2

Solved

When people refer to the "revised syntax" in OCaml, do they mean that this will become a new syntax for the language, or is it just an alternative syntax created in CamlP4? If it's the former, then...
Gastrology asked 26/5, 2010 at 23:32
1

© 2022 - 2024 — McMap. All rights reserved.