Questions tagged [camlp4]

CamlP4 is a parsing and pretty-printing framework for Objective Caml, often used as a preprocessor to extend OCaml syntax.

Camlp4 is a set of Objective Caml () libraries and tools for writing parsers and pretty-printers. Its most important use is to write extensions to the OCaml syntax.

The Objective Caml distribution includes CamlP4 since version 3.10.

There is also a separately-distributed CamlP5, which was called CamlP4 up to version 3.09.

65 questions
0
votes
1 answer

Camlp4 parser trace

I'm writing a simple parser with Camlp4. The complexity is starting to get to the point where I am having trouble reasoning about the exact parse sequence. What would be the best way to produce a "trace" of the parse that includes the tokens…
brooks94
  • 3,836
  • 4
  • 30
  • 57
0
votes
1 answer

Installing Old Active Networking Language PLAN

Can someone please help me interpret this? I am trying to install PLAN (a Packet Language for Active Networks). From my terminal on Mac OS X 10.8.4: hntvlan569:~ Scott_Andrew_Collins$ cd OCamlPLAN hntvlan569:OCamlPLAN Scott_Andrew_Collins$ cd…
user2581852
  • 39
  • 1
  • 1
  • 5
0
votes
1 answer

Ocaml lexer / parser rules

I wrote a program in ocaml that given an infix expression like 1 + 2, outputs the prefix notation : + 1 2 My problem is I don't find a way to make a rules like : all value, operator and bracket should be always separated by at least one space: 1+ 1…
axzwl
  • 23
  • 4
0
votes
2 answers

Camlp4 example : unbound module Printers.Ocaml

i'm exploring Camlp4 following this useful series of blog posts, but I'm having compilation problems. This is the code of my test.ml file : open Camlp4.PreCast let _loc = Loc.ghost in let cons = let rec loop () = try match read_line ()…
Fr.Usai
  • 384
  • 2
  • 17
-2
votes
1 answer

Error: Camlp4: Uncaught exception: Not_found

I am working on an Ocsigen example (http://ocsigen.org/tuto/manual/macaque). I get an error when trying to compile the program, as follows. File "testDB.ml", line 15, characters 14-81 (end at line 18, character 4): While finding quotation "table"…
1 2 3 4
5