mirror of
https://github.com/comby-tools/comby.git
synced 2024-08-16 16:50:37 +03:00
separate comby-kernel (#271)
This commit is contained in:
parent
84a76e1dc7
commit
fa71ea5408
35
comby-kernel.opam
Normal file
35
comby-kernel.opam
Normal file
@ -0,0 +1,35 @@
|
||||
opam-version: "2.0"
|
||||
maintainer: "rvantonder@gmail.com"
|
||||
authors: "Rijnard van Tonder"
|
||||
homepage: "https://github.com/comby-tools/comby"
|
||||
bug-reports: "https://github.com/comby-tools/comby/issues"
|
||||
dev-repo: "git+https://github.com/comby-tools/comby.git"
|
||||
license: "Apache-2.0"
|
||||
build: [
|
||||
[
|
||||
"dune"
|
||||
"build"
|
||||
"-p"
|
||||
name
|
||||
"-j"
|
||||
jobs
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
]
|
||||
]
|
||||
depends: [
|
||||
"dune" {>= "2.7.0"}
|
||||
"ocaml" {>= "4.08.1"}
|
||||
"angstrom" {>= "0.15.0"}
|
||||
"core_kernel"
|
||||
"mparser"
|
||||
"mparser-pcre"
|
||||
"ppx_deriving"
|
||||
"ppx_deriving_yojson" {>= "3.6.0"}
|
||||
"pcre"
|
||||
"bisect_ppx" {with-test & dev & >= "2.5.0"}
|
||||
]
|
||||
synopsis: "A match engine for structural code search and replace that supports ~every language"
|
||||
description: """
|
||||
Comby-kernel is the library that exposes the core matching engine for the comby application tool.
|
||||
"""
|
@ -20,7 +20,6 @@ build: [
|
||||
depends: [
|
||||
"dune" {>= "2.7.0"}
|
||||
"ocaml" {>= "4.08.1"}
|
||||
"angstrom" {>= "0.15.0"}
|
||||
"conf-autoconf"
|
||||
"conf-gmp"
|
||||
"conf-libev"
|
||||
@ -29,15 +28,17 @@ depends: [
|
||||
"conf-pkg-config"
|
||||
"conf-sqlite3"
|
||||
"conf-zlib" {os = "linux"}
|
||||
"hack_parallel" {arch != "arm32" & arch != "arm64"}
|
||||
"angstrom" {>= "0.15.0"}
|
||||
"cohttp-lwt-unix"
|
||||
"comby-kernel"
|
||||
"conduit-lwt-unix"
|
||||
"core"
|
||||
"hack_parallel" {arch != "arm32" & arch != "arm64"}
|
||||
"lwt"
|
||||
"lwt_react"
|
||||
"mparser"
|
||||
"mparser-pcre"
|
||||
"opium" {>= "0.19.0"}
|
||||
"cohttp-lwt-unix"
|
||||
"parany"
|
||||
"patience_diff" {>= "v0.14" & < "v0.15"}
|
||||
"ppx_deriving"
|
||||
|
@ -3,4 +3,4 @@
|
||||
(public_name comby.configuration)
|
||||
(instrumentation (backend bisect_ppx))
|
||||
(preprocess (pps ppx_deriving.show ppx_sexp_conv ppx_sexp_message ppx_deriving_yojson))
|
||||
(libraries comby.patdiff comby.camlzip comby.statistics comby.parsers comby.match comby.language core core.uuid mparser yojson ppx_deriving_yojson toml lwt lwt.unix))
|
||||
(libraries comby-kernel comby.patdiff comby.camlzip core yojson ppx_deriving_yojson toml lwt lwt.unix))
|
@ -5,11 +5,5 @@
|
||||
(preprocess (pps ppx_deriving.show ppx_deriving.eq ppx_sexp_conv))
|
||||
(libraries
|
||||
core
|
||||
comby.language
|
||||
comby.match
|
||||
comby.matchers
|
||||
comby.pipeline
|
||||
comby.replacement
|
||||
comby.rewriter
|
||||
comby.server_types
|
||||
comby.statistics))
|
||||
comby-kernel
|
||||
comby.pipeline))
|
@ -2,4 +2,4 @@
|
||||
(name interactive)
|
||||
(public_name comby.interactive)
|
||||
(preprocess (pps ppx_sexp_conv))
|
||||
(libraries comby.configuration comby.match core core.uuid shell.filename_extended lwt lwt.unix))
|
||||
(libraries comby-kernel comby.configuration core shell.filename_extended lwt lwt.unix))
|
@ -3,7 +3,7 @@
|
||||
(public_name comby.pipeline)
|
||||
(instrumentation (backend bisect_ppx))
|
||||
(preprocess (pps ppx_sexp_conv ppx_deriving_yojson))
|
||||
(libraries comby.configuration comby.interactive comby.statistics comby.parsers comby.match comby.language comby.camlzip core yojson ppx_deriving_yojson parany
|
||||
(libraries comby-kernel comby.statistics comby.configuration comby.interactive comby.camlzip core core.uuid yojson ppx_deriving_yojson parany
|
||||
(select parallel_hack.ml from
|
||||
(hack_parallel -> parallel_hack.available.ml)
|
||||
(!hack_parallel -> parallel_hack.parany_fallback.ml))
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
41
lib/kernel/comby_kernel.ml
Normal file
41
lib/kernel/comby_kernel.ml
Normal file
@ -0,0 +1,41 @@
|
||||
module Match = Match
|
||||
type match' = Match.t
|
||||
|
||||
module Matchers = struct
|
||||
module Matcher = Matchers.Matcher
|
||||
|
||||
module Configuration = Matchers.Configuration
|
||||
type configuration = Configuration.t
|
||||
|
||||
module Syntax = Matchers.Syntax
|
||||
type syntax = Matchers.Syntax.t
|
||||
module Hole = Matchers.Hole
|
||||
|
||||
module Metasyntax = Matchers.Metasyntax
|
||||
type metasyntax = Matchers.Metasyntax.t
|
||||
|
||||
module Alpha = Matchers.Alpha
|
||||
module Omega = Matchers.Omega
|
||||
|
||||
module Languages = Matchers.Languages
|
||||
end
|
||||
|
||||
module Rule = struct
|
||||
open Language
|
||||
type t = Rule.t
|
||||
type result = Rule.result
|
||||
|
||||
let sat = Rule.Alpha.sat
|
||||
let result_env = Rule.Alpha.result_env
|
||||
let create = Rule.Alpha.create
|
||||
let apply = Rule.Alpha.apply
|
||||
end
|
||||
type rule = Rule.t
|
||||
|
||||
module Replacement = Replacement
|
||||
type replacement = Replacement.result
|
||||
|
||||
module Rewrite = struct
|
||||
include Rewriter.Rewrite
|
||||
include Rewriter.Rewrite_template
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user