Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (83fb737733b754a0ae0fa997cda29a17e2dcc525)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (83fb737733b754a0ae0fa997cda29a17e2dcc525)
  • Date: Thu, 7 Jan 2021 18:55:00 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

ChangeLog | 5
devel/ocaml-ppx-tools-versioned/BUILD | 1
devel/ocaml-ppx-tools-versioned/DEPENDS | 6
devel/ocaml-ppx-tools-versioned/DETAILS | 18 ++
devel/ocaml-ppx-tools-versioned/HISTORY | 2
devel/ocaml-ppx-tools-versioned/INSTALL | 1
devel/ocaml-ppx-tools-versioned/PRE_BUILD | 4
devel/ocaml-sedlex/BUILD | 1
devel/ocaml-sedlex/DEPENDS | 7
devel/ocaml-sedlex/DETAILS | 35 ++++
devel/ocaml-sedlex/HISTORY | 3
devel/ocaml-sedlex/PRE_BUILD | 3
devel/ocaml-sedlex/TRIGGERS | 1
devel/ocaml-sedlex/patches/0001-Updates-for-modern-ocaml.patch | 75
++++++++++
14 files changed, 162 insertions(+)

New commits:
commit 83fb737733b754a0ae0fa997cda29a17e2dcc525
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

ocaml-sedlex: new spell, An OCaml lexer generator for Unicode

commit 76c7536367e8985171022175953bdc4019421f54
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

ocaml-ppx-tools-versioned: new spell, Tools for authors of ppx rewriters

diff --git a/ChangeLog b/ChangeLog
index 897d3a6..9eaf0e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-07 Ismael Luceno <ismael AT sourcemage.org>
+ * devel/ocaml-ppx-tools-versioned: new spell, Tools for authors
+ of ppx rewriters
+ * devel/ocaml-sedlex: new spell, An OCaml lexer generator for Unicode
+
2021-01-06 Ismael Luceno <ismael AT sourcemage.org>
* devel/ocaml-ppx-derivers: new spell, Shared [@@deriving] plugin
registry
diff --git a/devel/ocaml-ppx-tools-versioned/BUILD
b/devel/ocaml-ppx-tools-versioned/BUILD
new file mode 100755
index 0000000..7afe3ec
--- /dev/null
+++ b/devel/ocaml-ppx-tools-versioned/BUILD
@@ -0,0 +1 @@
+dune build
diff --git a/devel/ocaml-ppx-tools-versioned/DEPENDS
b/devel/ocaml-ppx-tools-versioned/DEPENDS
new file mode 100755
index 0000000..e9b2e85
--- /dev/null
+++ b/devel/ocaml-ppx-tools-versioned/DEPENDS
@@ -0,0 +1,6 @@
+. "$GRIMOIRE"/FUNCTIONS &&
+vdepends <<EOF
+ dune
+ ocaml
+ ocaml-migrate-parsetree < 2.0.0
+EOF
diff --git a/devel/ocaml-ppx-tools-versioned/DETAILS
b/devel/ocaml-ppx-tools-versioned/DETAILS
new file mode 100755
index 0000000..dd461c9
--- /dev/null
+++ b/devel/ocaml-ppx-tools-versioned/DETAILS
@@ -0,0 +1,18 @@
+ SPELL=ocaml-ppx-tools-versioned
+ VERSION=5.4.0
+ WEB_SITE="https://github.com/ocaml-ppx/ppx_tools_versioned";
+ SOURCE="${WEB_SITE##*/}-$VERSION.tar.gz"
+ SOURCE_URL[0]="$WEB_SITE/archive/$VERSION.tar.gz"
+
SOURCE_HASH=sha512:7f0421dbb42b43acc4f7892ac1c4c0ac13bdc188400d308688c4548b228aaf8bd80a4e2294672b50c78ac61e3c8df148c98d16b59f48292f02be40e7fd9640a9
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SOURCE%.tar.gz}"
+ LICENSE[0]="MIT"
+ ENTERED=20210106
+ KEYWORDS=""
+ SHORT="Tools for authors of ppx rewriters"
+cat << EOF
+Tools for authors of syntactic tools (such as ppx rewriters).
+
+The tools are installed as a findlib package called 'ppx_tools'. Executables
+are thus accessible through the ocamlfind driver (e.g.: ocamlfind
+ppx_tools/dumpast).
+EOF
diff --git a/devel/ocaml-ppx-tools-versioned/HISTORY
b/devel/ocaml-ppx-tools-versioned/HISTORY
new file mode 100644
index 0000000..e36635c
--- /dev/null
+++ b/devel/ocaml-ppx-tools-versioned/HISTORY
@@ -0,0 +1,2 @@
+2021-01-05 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, DEPENDS, DETAILS, INSTALL, PRE_BUILD: spell created
diff --git a/devel/ocaml-ppx-tools-versioned/INSTALL
b/devel/ocaml-ppx-tools-versioned/INSTALL
new file mode 100755
index 0000000..44e3bdb
--- /dev/null
+++ b/devel/ocaml-ppx-tools-versioned/INSTALL
@@ -0,0 +1 @@
+dune install
diff --git a/devel/ocaml-ppx-tools-versioned/PRE_BUILD
b/devel/ocaml-ppx-tools-versioned/PRE_BUILD
new file mode 100755
index 0000000..d42a43f
--- /dev/null
+++ b/devel/ocaml-ppx-tools-versioned/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+# suppress errors due to deprecated features (Longident.parse)
+sedit 's/(flags (:standard -w +A/&-3/' dune.inc
diff --git a/devel/ocaml-sedlex/BUILD b/devel/ocaml-sedlex/BUILD
new file mode 100755
index 0000000..8f58e6d
--- /dev/null
+++ b/devel/ocaml-sedlex/BUILD
@@ -0,0 +1 @@
+make
diff --git a/devel/ocaml-sedlex/DEPENDS b/devel/ocaml-sedlex/DEPENDS
new file mode 100755
index 0000000..40371f7
--- /dev/null
+++ b/devel/ocaml-sedlex/DEPENDS
@@ -0,0 +1,7 @@
+. "$GRIMOIRE"/FUNCTIONS &&
+vdepends <<EOF
+ dune
+ ocaml
+ ocaml-gen
+ ocaml-ppx-tools-versioned
+EOF
diff --git a/devel/ocaml-sedlex/DETAILS b/devel/ocaml-sedlex/DETAILS
new file mode 100755
index 0000000..ca5f9b1
--- /dev/null
+++ b/devel/ocaml-sedlex/DETAILS
@@ -0,0 +1,35 @@
+ SPELL=ocaml-sedlex
+ VERSION=2.2
+ SOURCE="sedlex-$VERSION.tar.gz"
+ WEB_SITE="https://github.com/ocaml-community/sedlex";
+ SOURCE_URL=("$WEB_SITE/archive/v$VERSION.tar.gz")
+
SOURCE_HASH=sha512:c38940654d8d2a4b8f627bc9109b0fd983c520d8db05bf4b514ddc05cf50946c086d3558dfced64cc8f2b4eaabc6155426eb44ee6d903e3520ebb65daadf990a
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/${SOURCE%.tar.gz}"
+ LICENSE[0]="MIT"
+ ENTERED=20210106
+ KEYWORDS=""
+ SHORT="An OCaml lexer generator for Unicode"
+cat << EOF
+sedlex is a lexer generator for OCaml, similar to ocamllex, but supporting
+Unicode. Contrary to ocamllex, lexer specifications for sedlex are embedded
+in regular OCaml source files.
+
+The lexers work with a new kind of "lexbuf", similar to ocamllex Lexing
+lexbufs, but designed to support Unicode, and abstracting from a specific
+encoding. A single lexer can work with arbitrary encodings of the input
stream.
+
+sedlex is the successor of the ulex project. Contrary to ulex which was
+implemented as a Camlp4 syntax extension, sedlex is based on the new "-ppx"
+technology of OCaml, which allow rewriting OCaml parse trees through external
+rewriters. (And what a better name than "sed" for a rewriter?)
+
+As any -ppx rewriter, sedlex does not touch the concrete syntax of the
+language: lexer specifications are written in source file which comply
+with the standard grammar of OCaml programs. sedlex reuse the syntax for
+pattern matching in order to describe lexers (regular expressions are encoded
+within OCaml patterns). A nice consequence is that your editor (vi, emacs,
+...) won't get confused (indentation, coloring) and you don't need to learn
+new priority rules. Moreover, sedlex is compatible with any front-end parsing
+technology: it works fine even if you use camlp4 or camlp5, with the standard
+or revised syntax.
+EOF
diff --git a/devel/ocaml-sedlex/HISTORY b/devel/ocaml-sedlex/HISTORY
new file mode 100644
index 0000000..2ae78a5
--- /dev/null
+++ b/devel/ocaml-sedlex/HISTORY
@@ -0,0 +1,3 @@
+2021-01-06 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, DEPENDS, DETAILS, PRE_BUILD, TRIGGERS,
+ patches/0001-Updates-for-modern-ocaml.patch: spell created
diff --git a/devel/ocaml-sedlex/PRE_BUILD b/devel/ocaml-sedlex/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/devel/ocaml-sedlex/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/devel/ocaml-sedlex/TRIGGERS b/devel/ocaml-sedlex/TRIGGERS
new file mode 100755
index 0000000..6b6eba3
--- /dev/null
+++ b/devel/ocaml-sedlex/TRIGGERS
@@ -0,0 +1 @@
+on_cast ocaml cast_self
diff --git a/devel/ocaml-sedlex/patches/0001-Updates-for-modern-ocaml.patch
b/devel/ocaml-sedlex/patches/0001-Updates-for-modern-ocaml.patch
new file mode 100644
index 0000000..6084a46
--- /dev/null
+++ b/devel/ocaml-sedlex/patches/0001-Updates-for-modern-ocaml.patch
@@ -0,0 +1,75 @@
+From b85719784c15e6572dede84b76dbcadaddf592f6 Mon Sep 17 00:00:00 2001
+From: domq <dominique AT quatravaux.org>
+Date: Mon, 22 Jun 2020 15:40:23 +0200
+Subject: [PATCH] Updates for modern ocaml (#92)
+
+* [fix] OCaml 4.08.1 no longer likes `Pervasives.compare`
+
+* [fix] Update suggested ocamlc commands
+
+Fixes #74
+
+* [doc] Instructions for utop
+
+Co-authored-by: Dominique Quatravaux <dominique.quatravaux AT epfl.ch>
+---
+ README.md | 12 ++++++++++--
+ src/generator/gen_unicode.ml.inc | 4 ++--
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/README.md b/README.md
+index a8741b3..24a664c 100644
+--- a/README.md
++++ b/README.md
+@@ -199,13 +199,13 @@ Installation (after "make"):
+ Compilation of OCaml files with lexer specifications:
+
+ ```
+- ocamlfind ocamlc -c -package sedlex my_file.ml
++ ocamlfind ocamlc -c -package sedlex.ppx my_file.ml
+ ```
+
+ When linking, you must also include the sedlex package:
+
+ ```
+- ocamlfind ocamlc -o my_prog -linkpkg -package sedlex my_file.cmo
++ ocamlfind ocamlc -o my_prog -linkpkg -package sedlex.ppx my_file.cmo
+ ```
+
+
+@@ -221,6 +221,14 @@ source file through -ppx rewriter ppx_sedlex. Moreover,
you need to
+ link the application with the runtime support library for sedlex
+ (sedlexing.cma / sedlexing.cmxa).
+
++### With utop
++
++Once sedlex is installed as per above, simply type
++
++```
++#require "sedlex.ppx";;
++```
++
+ ## Examples
+
+ The `examples/` subdirectory contains several samples of sedlex in use.
+diff --git a/src/generator/gen_unicode.ml.inc
b/src/generator/gen_unicode.ml.inc
+index 44106a1..78415fc 100644
+--- a/src/generator/gen_unicode.ml.inc
++++ b/src/generator/gen_unicode.ml.inc
+@@ -77,14 +77,14 @@ let split list n =
+
+ let print_elements ch hashtbl =
+ let cats =
+- List.sort_uniq Pervasives.compare
++ List.sort_uniq compare
+ (Hashtbl.fold (fun cat _ l -> cat::l) hashtbl [])
+ in
+ let len = List.length cats in
+ List.iter (fun c ->
+ let entries =
+ List.map (fun (b,e) -> Printf.sprintf "0x%x, 0x%x" b e)
+- (List.sort_uniq Pervasives.compare
++ (List.sort_uniq compare
+ (Hashtbl.find_all hashtbl c))
+ in
+ let entries =



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (83fb737733b754a0ae0fa997cda29a17e2dcc525), Ismael Luceno, 01/07/2021

Archive powered by MHonArc 2.6.24.

Top of Page