Commits

camlspotter committed be089b0

backport from p4hack

  • Participants
  • Parent commits 7b94fec

Comments (0)

Files changed (2)

 The followings are required for building an ocaml parser using Planck
 
 * pa_monad_custom -- from http://bitbucket.org/camlspotter/pa_monad_custom/
-* ocaml 3.12.0 source code tree, compiled, and its toplevel directory is symlinked as `ocaml' in this directory.
+* ocaml 3.12.0 source code tree, compiled, and its toplevel directory is symlinked as `ocaml/ocaml' in this directory. I mean, cat ocaml/ocaml/VERSION must show you a text "3.12.1...".
 * (optional) lablgtk-2.14.2 source code for test parsing of oo codes. Its toplevel directory must be symlinked as `lablgtk-2.14.2' in this directory.
 
 If you are not interesting in preparing these things for the ocaml parser, edit around the last line of OMakefile.

File ocaml/plparser.ml

 open Location
 open Asttypes
 open Longident
-open Locident
 open Parsetree
 
 let mktyp d =
   { pcl_desc = d; pcl_loc = symbol_rloc() }
 let mkcty d =
   { pcty_desc = d; pcty_loc = symbol_rloc() }
-let mklocident d =
-  { lident_desc = d; lident_loc = symbol_rloc() }
 
 let reloc_pat x = { x with ppat_loc = symbol_rloc () };;
 let reloc_exp x = { x with pexp_loc = symbol_rloc () };;
 
       )
 
+(* Oh, they are for my own modifs. Not existing in the vanilla ocaml.
   method locident = rule "locident" (fun () -> dummy
     <|> case "locident_0" (perform
 
            return (fun () ->  mklocident (LLdot(v_1, v_3)) ))
 
       )
+*)
 
 end
 (* /rules *)