Skip to content

Commit

Permalink
ocamlmerlin-mlx: copy more of merlin
Browse files Browse the repository at this point in the history
  • Loading branch information
andreypopp committed Jun 2, 2024
1 parent af669d8 commit 35562c0
Show file tree
Hide file tree
Showing 257 changed files with 88,951 additions and 9,128 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "ocaml"]
path = ocaml
url = https://github.com/ocaml/ocaml.git
[submodule "merlin_414"]
path = merlin_414
url = https://github.com/ocaml/merlin.git
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
init:
opam switch create . 5.1.1 --no-install -y
opam install . --deps-only -y
opam install menhir.20210419 ocamlformat ocaml-lsp-server -y
opam install menhir.20201216 ocamlformat ocaml-lsp-server -y

.PHONY: build
build:
Expand Down
5 changes: 2 additions & 3 deletions dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
(vendored_dirs merlin ocaml-lsp)

(data_only_dirs ocaml merlin-extend)
(vendored_dirs merlin-extend)
(data_only_dirs ocaml ocamlmerlin_mlx_414 merlin merlin_414)
869 changes: 869 additions & 0 deletions menhirLib/LICENSE

Large diffs are not rendered by default.

15 changes: 4 additions & 11 deletions mlx/menhirLib.ml → menhirLib/menhirLib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,8 @@ module Make (T : TABLE) = struct

(* In the legacy strategy, we call [reduce] instead of [announce_reduce],
apparently in an attempt to hide the reduction steps performed during
error handling. In the simplified strategy, all reductions steps are
error handling. This seems inconsistent, as the default reduction steps
are still announced. In the simplified strategy, all reductions are
announced. *)

match strategy with
Expand Down Expand Up @@ -1545,15 +1546,7 @@ module Make (T : TABLE) = struct
else begin

(* The stack is nonempty. Pop a cell, updating the current state
to the state [cell.state] found in the popped cell, and continue
error handling there. *)

(* I note that if the new state [cell.state] has a default reduction,
then it is ignored. It is unclear whether this is intentional. It
could be a good thing, as it avoids a scenario where the parser
diverges by repeatedly popping, performing a default reduction of
an epsilon production, popping, etc. Still, the question of whether
to obey default reductions while error handling seems obscure. *)
with that found in the popped cell, and try again. *)

let env = { env with
stack = next;
Expand Down Expand Up @@ -3792,5 +3785,5 @@ module MakeEngineTable (T : TableFormat.TABLES) = struct
end
end
module StaticVersion = struct
let require_20210419 = ()
let require_20201216 = ()
end
2 changes: 1 addition & 1 deletion mlx/menhirLib.mli → menhirLib/menhirLib.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1803,5 +1803,5 @@ module MakeEngineTable
and type nonterminal = int
end
module StaticVersion : sig
val require_20210419: unit
val require_20201216: unit
end
5 changes: 1 addition & 4 deletions mlx/dune
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,4 @@
(files ../ocaml/parsing/docstrings.{ml,mli}))

(copy_files
(mode promote)
(enabled_if
(<> %{profile} "release"))
(files ../ocaml/boot/menhir/menhirLib.{ml,mli}))
(files ../menhirLib/menhirLib.{ml,mli}))
Loading

0 comments on commit 35562c0

Please sign in to comment.