Skip to content

Commit

Permalink
opam package for the legacy parser
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Apr 18, 2022
1 parent a630a03 commit a83466e
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 10 deletions.
1 change: 1 addition & 0 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
(public_name elpi)
(libraries elpi)
(modules elpi_REPL)
(package elpi)
)

(env
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(lang dune 2.0)
(lang dune 2.8)
(name elpi)
(using menhir 2.0)
15 changes: 15 additions & 0 deletions elpi-option-legacy-parser.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
opam-version: "2.0"
maintainer: "Enrico Tassi <[email protected]>"
authors: [ "Enrico Tassi" ]
license: "LGPL-2.1-or-later"
homepage: "https://github.com/LPCIC/elpi"
doc: "https://LPCIC.github.io/elpi/"
dev-repo: "git+https://github.com/LPCIC/elpi.git"
bug-reports: "https://github.com/LPCIC/elpi/issues"

depends: [
"camlp5" {> "7.99"}
]
synopsis: "ELPI - option for legacy parser"
description: """
Enables the -legacy-parser flag, implemented on top of CamlP5"""
6 changes: 2 additions & 4 deletions elpi.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bug-reports: "https://github.com/LPCIC/elpi/issues"

build: [
["dune" "subst"] {dev}
[make "config" "LEGACY_PARSER=1"] {elpi-option-legacy-parser:installed}
[make "build" "DUNE_OPTS=-p %{name}% -j %{jobs}%"]
[make "tests" "DUNE_OPTS=-p %{name}%" "SKIP=performance_HO" "SKIP+=performance_FO"] {with-test & os != "macos" & os-distribution != "alpine" & os-distribution != "freebsd"}
]
Expand All @@ -26,10 +27,7 @@ depends: [
"conf-time" {with-test}
]
depopts: [
"camlp5" {> "7.99"}
]
conflicts: [
"camlp5" {< "8"}
"elpi-option-legacy-parser"
]
synopsis: "ELPI - Embeddable λProlog Interpreter"
description: """
Expand Down
1 change: 1 addition & 0 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
(install
(section lib)
(files builtin.elpi elpi-quoted_syntax.elpi elpi2html.elpi)
(package elpi)
)

(rule
Expand Down
4 changes: 3 additions & 1 deletion src/legacy_parser/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
(libraries elpi.util elpi.parser camlp5.gramlib)
(flags -w -A)
(preprocess (per_module ((action (run camlp5o -I . -I +camlp5 pa_extend.cmo pa_lexer.cmo %{input-file})) parser)))
(modules parser))
(modules parser)
(package elpi)
)
9 changes: 6 additions & 3 deletions src/parser/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
(public_name elpi.parser)
(preprocess (per_module ((pps ppx_deriving.std) ast)))
(libraries unix menhirLib elpi_lexer_config elpi.util stdlib-shims)
(modules ast grammar lexer parser_config error_messages parse))
(modules ast grammar lexer parser_config error_messages parse)
)

(library
(name elpi_lexer_config)
(public_name elpi.lexer_config)
(libraries elpi.util)
(modules tokens lexer_config))
(modules tokens lexer_config)
)

(executable
(name gen_token_precedence)
(modules gen_token_precedence)
(libraries elpi.lexer_config))
(libraries elpi.lexer_config)
)

(executable
(name gen_infix_lexer)
Expand Down
3 changes: 2 additions & 1 deletion src/utils/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
(name elpi_util)
(public_name elpi.util)
(libraries re.str)
(modules util))
(modules util)
)

0 comments on commit a83466e

Please sign in to comment.