Commits

HongboZhang committed 0c76e6e

bootstrapping successful

Comments (0)

Files changed (4)

 
 <camlp4/**/*.ml*>: camlp4boot, warn_Z
 <camlp4/Camlp4_{config,import}.ml*>: -camlp4boot
+<camlp4/p4_util.ml>:-camlp4boot
 "camlp4/Camlp4_import.ml": -warn_Z
 <camlp4/build/*> or <camlp4/boot/*> or "camlp4/Camlp4/Struct/Lexer.ml": -camlp4boot, -warn_Z, warn_a
 <camlp4/Camlp4Bin.{byte,native}> or <camlp4/{mkcamlp4,boot/camlp4boot}.byte>: use_dynlink
 "camlp4/Camlp4/Struct/DynLoader.ml" or "camlp4/boot/Camlp4.ml": include_dynlink
 <camlp4/Camlp4Top/**>: include_toplevel
 <camlp4/camlp4{,boot,o,r,of,rf,oof,orf}.byte>: -debug
-
+<camlp4/boot/Camlp4.cmo>:include_compiler
 <camlp4/Camlp4_config.ml> or <camlp4/Camlp4/ErrorHandler.ml> or <camlp4/Camlp4/Sig.ml> or <camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.{ml,mli}> or <camlp4/Camlp4/Struct/Loc.ml>: include_compiler
 
 <camlp4/boot/camlp4boot.byte>: use_compiler

camlp4/Changes.org

 * Issues
 
 ** Not Fixed
+
+*** DONE [[http://caml.inria.fr/mantis/view.php?id%3D4522][4522]] Camlp4 erases unused optional arguments
 *** [[http://caml.inria.fr/mantis/view.php?id%3D5650][5650]] fold generator does not handle well "abstract" types
 *** [[http://caml.inria.fr/mantis/view.php?id%3D4337][4377]] invalid char token (Fatal error)
 *** [[http://caml.inria.fr/mantis/view.php?id%3D5642][5642]] module type application
 *** [[http://caml.inria.fr/mantis/view.php?id%3D5239][5239]] Wrong location
 *** [[http://caml.inria.fr/mantis/view.php?id%3D5265][5265]] Wrong location
 *** [[http://caml.inria.fr/mantis/view.php?id%3D4545][4545]] wrong location docs
+*** [[http://caml.inria.fr/mantis/view.php?id%3D4346][4346]] comments messed up
 *** [[http://caml.inria.fr/mantis/view.php?id%3D4598][4598]] location error message emacs
 *** DONE [[http://caml.inria.fr/mantis/view.php?id%3D4659][4569]] wrong error message (parser seems to interpret many lines as one line)
 *** DONE [[http://caml.inria.fr/mantis/view.php?id%3D4602][4602]] StNil
 *** [[http://caml.inria.fr/mantis/view.php?id%3D4713][4173]] camlp4o documentation
 *** [[http://caml.inria.fr/mantis/view.php?id%3D4846][4846]] seems to be related to 4595
 *** [[http://caml.inria.fr/mantis/view.php?id%3D4855][4855]] camlp4 -I options
+    
+*** [[http://caml.inria.fr/mantis/view.php?id%3D4329][4329]] parser error message unuseful
+*** [[http://caml.inria.fr/mantis/view.php?id%3D4885][4885]] lexer for invalid string inputs.
+    Should be fixable when Lexer was separated
+*** [[http://caml.inria.fr/mantis/view.php?id%3D4886][4886]] Duplicated label expansion
+*** [[http://caml.inria.fr/mantis/view.php?id%3D3787][3787]] delete_rule removes empty precedence levels
+*** [[http://caml.inria.fr/mantis/view.php?id%3D4363][4363]] camp4 filter don't handle polymorphic variant
+*** [[http://caml.inria.fr/mantis/view.php?id%3D4452][4452]] CleanAst to clean for printing (cost)
+*** [[http://caml.inria.fr/mantis/view.php?id%3D5705][5705]] accept wrong syntax
+    #+BEGIN_SRC caml
+     let f x : type a. a = ()
+    #+END_SRC
+    
+*** [[http://caml.inria.fr/mantis/view.php?id%3D5716][5716]] 'remove_directory' was not supported
 ** Fixed
    
 **** [[http://caml.inria.fr/mantis/view.php?id%3D5301][5301]] exception equal to another exception
 **** [[http://caml.inria.fr/mantis/view.php?id%3D5633][5633]] escape bootstrap performance
 **** [[http://caml.inria.fr/mantis/view.php?id%3D5090][5090]] toplevel
 **** [[http://caml.inria.fr/mantis/view.php?id%3D5267][5267]] automatic tuplification
+
+* Separation
+  
+
+** File [[file:camlp4-build.log][Camlp4-build-log]]
+   for the initial version, it's linked into camlp4boot.byte,
+   camlp4lib.cma, camlp4fulllib.cma, camlp4_import.cmi is also installed
+
+** myocamlbuild
+   has a rule 'camlp4/camlp4_import.ml' to build camlp4_import, using
+   *Pathname.read*
+
+** camlp4lib.mllib, camlp4fulllib.mllib
+   has a module named Camlp4_import
+** file ErrorHandler
+   Camlp4Parsers: Oprint.float_repres => use p4_util
+** camlp4_import
+   --dirs utils, parsing, typing (only Oprint.float_repres)
+   is needed
+   
+
+   
+** 
+   

camlp4/boot/Camlp4.ml

         val of_lexing_position : Lexing.position -> t
           
         (** Return an OCaml location. *)
-        val to_ocaml_location : t -> Camlp4_import.Location.t
+        val to_ocaml_location : t -> Location.t
           
         (** Return a location from an OCaml location. *)
-        val of_ocaml_location : Camlp4_import.Location.t -> t
+        val of_ocaml_location : Location.t -> t
           
         (** Return a location from ocamllex buffer. *)
         val of_lexbuf : Lexing.lexbuf -> t
                | x when x = Obj.string_tag ->
                    "\"" ^ ((String.escaped (Obj.magic r : string)) ^ "\"")
                | x when x = Obj.double_tag ->
-                   Camlp4_import.Oprint.float_repres (Obj.magic r : float)
+                   P4_util.float_repres (Obj.magic r : float)
                | x when x = Obj.abstract_tag -> opaque "abstract"
                | x when x = Obj.custom_tag -> opaque "custom"
                | x when x = Obj.final_tag -> opaque "final"
           
         let to_ocaml_location x =
           {
-            Camlp4_import.Location.loc_start =
-              pos_to_lexing_position x.start x.file_name;
+            Location.loc_start = pos_to_lexing_position x.start x.file_name;
             loc_end = pos_to_lexing_position x.stop x.file_name;
             loc_ghost = x.ghost;
           }
           
         let of_ocaml_location {
-                                Camlp4_import.Location.loc_start = a;
+                                Location.loc_start = a;
                                 loc_end = b;
                                 loc_ghost = g
                               } =
                   in
                     if quotations c
                     then
-                      (move_start_p (- (String.length beginning));
+                      (move_start_p (- (String.length beginning)) c;
                        mk_quotation quotation c "" "" 2)
                     else parse (symbolchar_star ("<<" ^ beginning)) c
               | 19 ->
           sig
             open Camlp4Ast
               
-            val sig_item : sig_item -> Camlp4_import.Parsetree.signature
+            val sig_item : sig_item -> Parsetree.signature
               
-            val str_item : str_item -> Camlp4_import.Parsetree.structure
+            val str_item : str_item -> Parsetree.structure
               
-            val phrase : str_item -> Camlp4_import.Parsetree.toplevel_phrase
+            val phrase : str_item -> Parsetree.toplevel_phrase
               
           end
           
           struct
             open Format
               
-            open Camlp4_import.Parsetree
+            open Parsetree
               
-            open Camlp4_import.Longident
+            open Longident
               
-            open Camlp4_import.Asttypes
+            open Asttypes
               
             open Ast
               
               
             let mkghloc loc = Loc.to_ocaml_location (Loc.ghostify loc)
               
-            let with_loc txt loc =
-              Camlp4_import.Location.mkloc txt (mkloc loc)
+            let with_loc txt loc = Location.mkloc txt (mkloc loc)
               
             let mktyp loc d = { ptyp_desc = d; ptyp_loc = mkloc loc; }
               

camlp4/boot/camlp4boot.ml

                              Ast.ExApp (_loc,
                                (Ast.ExId (_loc,
                                   (Ast.IdAcc (_loc,
-                                     (Ast.IdUid (_loc, "Camlp4_import")),
-                                     (Ast.IdAcc (_loc,
-                                        (Ast.IdUid (_loc, "Oprint")),
-                                        (Ast.IdLid (_loc, "float_repres")))))))),
+                                     (Ast.IdUid (_loc, "P4_util")),
+                                     (Ast.IdLid (_loc, "float_repres")))))),
                                e)
                          | "`str" ->
                              Ast.ExApp (_loc,