add ocaml-sedlex 2.1
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.
This commit is contained in:
parent
2715177996
commit
69cc14895e
|
@ -0,0 +1,25 @@
|
|||
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.
|
|
@ -0,0 +1,23 @@
|
|||
# $NetBSD: Makefile,v 1.20 2019/08/27 19:56:03 schmonz Exp $
|
||||
|
||||
DISTNAME= ocaml-sedlex-2.1
|
||||
GITHUB_PROJECT= sedlex
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=ocaml-community/}
|
||||
GITHUB_TAG= v${PKGVERSION_NOREV}
|
||||
|
||||
MAINTAINER= netbsd-users@NetBSD.org
|
||||
HOMEPAGE= https://github.com/ocaml-community/sedlex
|
||||
COMMENT= OCaml lexer generator for Unicode
|
||||
LICENSE= mit
|
||||
|
||||
USE_TOOLS+= gmake
|
||||
|
||||
OCAML_USE_DUNE= yes
|
||||
BUILD_DEPENDS+= ocaml-odoc-[0-9]*:../../wip/ocaml-odoc
|
||||
|
||||
.include "../../mk/ocaml.mk"
|
||||
.include "../../devel/ocaml-ppx_tools/buildlink3.mk"
|
||||
.include "../../wip/ocaml-gen/buildlink3.mk"
|
||||
.include "../../lang/ocaml/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -0,0 +1,48 @@
|
|||
@comment $NetBSD$
|
||||
${OCAML_SITELIB}/sedlex/META
|
||||
${OCAML_SITELIB}/sedlex/dune-package
|
||||
${OCAML_SITELIB}/sedlex/opam
|
||||
${OCAML_SITELIB}/sedlex/ppx/ppx.exe
|
||||
${OCAML_SITELIB}/sedlex/ppx/ppx_sedlex.ml
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex.ml
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex.mli
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_cset.ml
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_cset.mli
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx.a
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx.cma
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx.cmi
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx.cmt
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx.cmx
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx.cmxa
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx.cmxs
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx.ml
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Ppx_sedlex.cmi
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Ppx_sedlex.cmt
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Ppx_sedlex.cmx
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Sedlex.cmi
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Sedlex.cmt
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Sedlex.cmti
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Sedlex.cmx
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Sedlex_cset.cmi
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Sedlex_cset.cmt
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Sedlex_cset.cmti
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Sedlex_cset.cmx
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Unicode.cmi
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Unicode.cmt
|
||||
${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Unicode.cmti
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/ppx/sedlex_ppx__Unicode.cmx
|
||||
${OCAML_SITELIB}/sedlex/ppx/unicode.ml
|
||||
${OCAML_SITELIB}/sedlex/ppx/unicode.mli
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/sedlex.a
|
||||
${OCAML_SITELIB}/sedlex/sedlex.cma
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/sedlex.cmxa
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/sedlex.cmxs
|
||||
${OCAML_SITELIB}/sedlex/sedlexing.cmi
|
||||
${OCAML_SITELIB}/sedlex/sedlexing.cmt
|
||||
${OCAML_SITELIB}/sedlex/sedlexing.cmti
|
||||
${PLIST.ocaml-opt}${OCAML_SITELIB}/sedlex/sedlexing.cmx
|
||||
${OCAML_SITELIB}/sedlex/sedlexing.ml
|
||||
${OCAML_SITELIB}/sedlex/sedlexing.mli
|
||||
share/doc/sedlex/CHANGES
|
||||
share/doc/sedlex/LICENSE
|
||||
share/doc/sedlex/README.md
|
|
@ -0,0 +1,13 @@
|
|||
# $NetBSD$
|
||||
|
||||
BUILDLINK_TREE+= ocaml-sedlex
|
||||
|
||||
.if !defined(OCAML_SEDLEX_BUILDLINK3_MK)
|
||||
OCAML_SEDLEX_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.ocaml-sedlex+= ocaml-sedlex>=2.1
|
||||
BUILDLINK_PKGSRCDIR.ocaml-sedlex?= ../../devel/ocaml-sedlex
|
||||
|
||||
.endif # OCAML_SEDLEX_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -ocaml-sedlex
|
|
@ -0,0 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.8 2019/05/15 09:01:03 jaapb Exp $
|
||||
|
||||
SHA1 (ocaml-sedlex-2.1.tar.gz) = e1f569e6ca795116ead43f2a0625b01d385b63bd
|
||||
RMD160 (ocaml-sedlex-2.1.tar.gz) = 3e746ee910ed768fa59a7bc69a0926bb5b25b1e4
|
||||
SHA512 (ocaml-sedlex-2.1.tar.gz) = df379c0b9db396cec454d1ac151f8bfc597d26447f30220f87b0d919be541d44dce56c932a6573d066395932f5d59e429922a0b44c8f853e3954faf1893856eb
|
||||
Size (ocaml-sedlex-2.1.tar.gz) = 114191 bytes
|
Loading…
Reference in New Issue