1. camlspotter
  2. planck

Commits

camlspotter  committed fb6e935 Merge

merge

  • Participants
  • Parent commits e957870, 094bfe0
  • Branches default

Comments (0)

Files changed (8)

File OMyMakefile

View file
 #| A flag to tell that we can use OMyMakefile functions
 WithOMy=true
 
-#| The prefix. Equal to the PREFIX environment variable
-try
-  PREFIX=$(getenv PREFIX)
-default
-  try
-    PREFIX=$(getenv prefix)
-  default
-    eprintln(Specify PREFIX or prefix environment variable.)
-    exit 1 
-
 # OCaml 
 # ========================================================================
 

File _oasis

View file
 OASISFormat: 0.2
 Name:        planck
-Version:     2.0.0
-Synopsis:    Planck(Parser LANguage Combinator Kit): a small parser combinator library
+Version:     2.0.1
+Synopsis:    Tiny Parsec in OCaml
 Authors:     Jun FURUSE
 License:     LGPL-2.0 with OCaml linking exception
 Plugins:      StdFiles (0.2)
 BuildType:    Custom (0.2)
 InstallType:    Custom (0.2)
-XCustomBuild: yes no | omake --install; omake
-XCustomInstall: omake install
-XCustomUninstall: omake uninstall
+XCustomBuild: . yes no | omake --install; PREFIX=$prefix omake
+XCustomInstall: PREFIX=$prefix omake install
+XCustomUninstall: PREFIX=$prefix omake uninstall
 BuildTools: omake
-
-Library planck
-  Path:          lib
-  FindlibName:   planck
-  BuildDepends:  sexplib (>= 108.07.00), spotlib (>= 2.0.0)
-  Modules:       Position,
-                 Result,
-                 Stream_intf,
-                 Stream,
-                 Sstring,
-                 Smemo,
-                 Sbuffer,
-                 Planck_intf,
-                 Pbase,
-                 Pbaseexn,
-                 Pbaseref,
-                 Pchar,
-                 Pbuffer,
-                 Pstate,
-                 Pmemo,
-                 Op_prec
+BuildDepends:  unix

File lib/META

View file
 # OASIS_START
 # DO NOT EDIT (digest: 8e57f046ce034f177cd68b56a3bde28f)
-version = "1.1.0"
+version = "2.0.1"
 description
  =
  "Planck(Parser LANguage Combinator Kit): a small parser combinator library"

File ocaml/OMakefile

View file
+.PHONY: all clean
+
+OCAMLPACKAGEFLAGS=
+
+# BYTE_ENABLED= true
+
 OCAMLINCLUDES += ../lib ocaml/utils ocaml/parsing
+
 OCAMLFLAGS    += -annot -w Ae
+OCAMLCFLAGS   +=
+OCAMLOPTFLAGS += 
+OCAML_LINK_FLAGS += 
+OCAML_BYTE_LINK_FLAGS +=
+OCAML_NATIVE_LINK_FLAGS +=
 
 CAMLP4PACKS[]=
     monad-custom
    ocamlyacc
    ocamlyacctest
 
+# MyOCamlProgram(hamkl, $(FILES))
+
 FILES0[] =
    ../lib/planck
    input
    tokentest
 
 if $(file-exists ocaml/VERSION)
-   MyOCamlTestProgram(token, $(FILES1))
+   MyOCamlProgram(token, $(FILES1))
    export
 
 FILES2[] =
    parsertest
 
 if $(file-exists ocaml/VERSION)
-   MyOCamlTestProgram(parser, $(FILES2))
-   test: parser
-       $(shell bash -c 'for i in test*.ml test*.mli; do ./parser $$i; done') 
-   test2: parser
-       $(shell bash -c 'for i in test*.ml test*.mli; do ./lexertest $$i; done') 
+   MyOCamlProgram(parser, $(FILES2))
    export
 
 FILES3[] =
    lexertest
 
 if $(file-exists ocaml/VERSION)
-   MyOCamlTestProgram(lexertest, $(FILES3))
+   MyOCamlProgram(lexertest, $(FILES3))
    export
 
 plparser.auto.ml: hamkl.opt ../ocaml/parsing/parser.mly
 
 .PHONY: test test2
 
-diff.txt: plparser.auto.ml
-    diff -c plparser.auto.ml plparser.ml  > diff.txt
+if $(file-exists ocaml/VERSION)
+  test: parser
+      $(shell bash -c 'for i in test*.ml test*.mli; do ./parser $$i; done') 
+
+  test2: parser
+      $(shell bash -c 'for i in test*.ml test*.mli; do ./lexertest $$i; done') 
+
+  diff.txt: plparser.auto.ml
+      diff -c plparser.auto.ml plparser.ml  > diff.txt
+  export

File opam/planck.1.0.1/descr

-A small monadic parser combinator library
-Parser LANguage Combinator Kit A LL(n) parser monadic combinator
-library in OCaml. It includes a big example of lexer+parser for OCaml
-syntax.

File opam/planck.1.0.1/url

-archive: "https://bitbucket.org/camlspotter/planck/get/v1.0.1.tar.gz"
-checksum: "8aa1ca06c2f79407133fe62f495bd416"

File setup.ml

View file
 (* setup.ml generated for the first time by OASIS v0.2.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: cef0b267827af2c54b8fb09df3311ebf) *)
+(* DO NOT EDIT (digest: 7e8cfe13bb2dcfec6b0b9b7fbdecd664) *)
 (*
    Regenerated by OASIS v0.3.0
    Visit http://oasis.forge.ocamlcore.org for more information and
             CustomPlugin.cmd_main =
               [
                  (OASISExpr.EBool true,
-                   ("yes", ["no"; "|"; "omake"; "--install;"; "omake"]))
+                   (".",
+                     [
+                        "yes";
+                        "no";
+                        "|";
+                        "omake";
+                        "--install;";
+                        "PREFIX=$prefix";
+                        "omake"
+                     ]))
               ];
             cmd_clean = [(OASISExpr.EBool true, None)];
             cmd_distclean = [(OASISExpr.EBool true, None)];
        CustomPlugin.main
          {
             CustomPlugin.cmd_main =
-              [(OASISExpr.EBool true, ("omake", ["install"]))];
+              [
+                 (OASISExpr.EBool true,
+                   ("PREFIX=$prefix", ["omake"; "install"]))
+              ];
             cmd_clean = [(OASISExpr.EBool true, None)];
             cmd_distclean = [(OASISExpr.EBool true, None)];
             };
        CustomPlugin.main
          {
             CustomPlugin.cmd_main =
-              [(OASISExpr.EBool true, ("omake", ["uninstall"]))];
+              [
+                 (OASISExpr.EBool true,
+                   ("PREFIX=$prefix", ["omake"; "uninstall"]))
+              ];
             cmd_clean = [(OASISExpr.EBool true, None)];
             cmd_distclean = [(OASISExpr.EBool true, None)];
             };
                CustomPlugin.cmd_main =
                  [
                     (OASISExpr.EBool true,
-                      ("yes", ["no"; "|"; "omake"; "--install;"; "omake"]))
+                      (".",
+                        [
+                           "yes";
+                           "no";
+                           "|";
+                           "omake";
+                           "--install;";
+                           "PREFIX=$prefix";
+                           "omake"
+                        ]))
                  ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
           CustomPlugin.clean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("omake", ["install"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("PREFIX=$prefix", ["omake"; "install"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                };
           CustomPlugin.clean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("omake", ["uninstall"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("PREFIX=$prefix", ["omake"; "uninstall"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                }
                CustomPlugin.cmd_main =
                  [
                     (OASISExpr.EBool true,
-                      ("yes", ["no"; "|"; "omake"; "--install;"; "omake"]))
+                      (".",
+                        [
+                           "yes";
+                           "no";
+                           "|";
+                           "omake";
+                           "--install;";
+                           "PREFIX=$prefix";
+                           "omake"
+                        ]))
                  ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
           CustomPlugin.distclean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("omake", ["install"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("PREFIX=$prefix", ["omake"; "install"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                };
           CustomPlugin.distclean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("omake", ["uninstall"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("PREFIX=$prefix", ["omake"; "uninstall"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                }
           ocaml_version = None;
           findlib_version = None;
           name = "planck";
-          version = "2.0.0";
+          version = "2.0.1";
           license =
             OASISLicense.DEP5License
               (OASISLicense.DEP5Unit
           maintainers = [];
           authors = ["Jun FURUSE"];
           homepage = None;
-          synopsis =
-            "Planck(Parser LANguage Combinator Kit): a small parser combinator library";
+          synopsis = "Tiny Parsec in OCaml";
           description = None;
           categories = [];
           conf_type = (`Configure, "internal", Some "0.3");
                post_command = [(OASISExpr.EBool true, None)];
                };
           files_ab = [];
-          sections =
-            [
-               Library
-                 ({
-                     cs_name = "planck";
-                     cs_data = PropList.Data.create ();
-                     cs_plugin_data = [];
-                     },
-                   {
-                      bs_build = [(OASISExpr.EBool true, true)];
-                      bs_install = [(OASISExpr.EBool true, true)];
-                      bs_path = "lib";
-                      bs_compiled_object = Best;
-                      bs_build_depends =
-                        [
-                           FindlibPackage
-                             ("sexplib",
-                               Some (OASISVersion.VGreaterEqual "108.07.00"));
-                           FindlibPackage
-                             ("spotlib",
-                               Some (OASISVersion.VGreaterEqual "2.0.0"))
-                        ];
-                      bs_build_tools = [ExternalTool "omake"];
-                      bs_c_sources = [];
-                      bs_data_files = [];
-                      bs_ccopt = [(OASISExpr.EBool true, [])];
-                      bs_cclib = [(OASISExpr.EBool true, [])];
-                      bs_dlllib = [(OASISExpr.EBool true, [])];
-                      bs_dllpath = [(OASISExpr.EBool true, [])];
-                      bs_byteopt = [(OASISExpr.EBool true, [])];
-                      bs_nativeopt = [(OASISExpr.EBool true, [])];
-                      },
-                   {
-                      lib_modules =
-                        [
-                           "Position";
-                           "Result";
-                           "Stream_intf";
-                           "Stream";
-                           "Sstring";
-                           "Smemo";
-                           "Sbuffer";
-                           "Planck_intf";
-                           "Pbase";
-                           "Pbaseexn";
-                           "Pbaseref";
-                           "Pchar";
-                           "Pbuffer";
-                           "Pstate";
-                           "Pmemo";
-                           "Op_prec"
-                        ];
-                      lib_pack = false;
-                      lib_internal_modules = [];
-                      lib_findlib_parent = None;
-                      lib_findlib_name = Some "planck";
-                      lib_findlib_containers = [];
-                      })
-            ];
+          sections = [];
           plugins = [(`Extra, "StdFiles", Some "0.2")];
           schema_data = PropList.Data.create ();
           plugin_data = [];
           };
      oasis_fn = Some "_oasis";
      oasis_version = "0.3.0";
-     oasis_digest = Some "\177\165\141\163K\189\210\019\\\245O\191<\1495\139";
+     oasis_digest = Some "\152A\188GE\196GS\139H\016\"T\141\158\241";
      oasis_exec = None;
      oasis_setup_args = [];
      setup_update = false;
 
 let setup () = BaseSetup.setup setup_t;;
 
-# 5594 "setup.ml"
+# 5580 "setup.ml"
 (* OASIS_STOP *)
 let () = setup ();;

File test/OMakefile

View file
+.PHONY: all clean
+
+BYTE_ENABLED= true
+
 OCAMLINCLUDES += ../lib
+
 OCAMLFLAGS    += -annot -w Ae
+OCAMLCFLAGS   +=
+OCAMLOPTFLAGS +=
+OCAML_LINK_FLAGS += 
 OCAML_BYTE_LINK_FLAGS += planck.cmo
 OCAML_NATIVE_LINK_FLAGS += planck.cmx
 
 OCAMLDEPFLAGS= -syntax camlp4o -package sexplib.syntax
 OCAMLPPFLAGS= -syntax camlp4o -package sexplib.syntax
 
+OCAML_LIBS +=
+OCAML_CLIBS +=
+OCAML_OTHER_LIBS +=
+OCAML_LIB_FLAGS +=
+
 %.cmo %.cmi %.cma %.annot %.spot %.spit : ../lib/planck.cmo ../lib/planck.cmi
 %.cmx %.cmxa : ../lib/planck.cmx ../lib/planck.cmo
 
 Test(name) = 
-   MyOCamlTestProgram($(name), $(name))
+   MyOCamlProgram($(name), $(name)) # No install
    export
 
 Test(expr)