From f18df9906b90c563063470f95fe799259f3fa6e5 Mon Sep 17 00:00:00 2001 From: Yann Regis-Gianas Date: Fri, 1 Feb 2019 14:29:34 +0100 Subject: [PATCH] Possible fix for CheckSafeParameterizedGrammar. --- src/CheckSafeParameterizedGrammar.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CheckSafeParameterizedGrammar.ml b/src/CheckSafeParameterizedGrammar.ml index 984b0773..937a6083 100644 --- a/src/CheckSafeParameterizedGrammar.ml +++ b/src/CheckSafeParameterizedGrammar.ml @@ -79,7 +79,7 @@ type edge = | Safe | Dangerous -let successors_parameter (f : edge -> formal -> unit) x (param : parameter) = +let rec successors_parameter (f : edge -> formal -> unit) x param = match param with | ParameterVar _ -> (* This is not an application. No successors. *) @@ -90,6 +90,7 @@ let successors_parameter (f : edge -> formal -> unit) x (param : parameter) = then there is an edge to the formal [nt, i]. Whether it is a safe or dangerous edge depends on whether [x] occurs shallow or deep. *) List.iteri (fun i param -> + successors_parameter f x param; if Parameters.occurs_shallow x param then f Safe (nt, i) else if Parameters.occurs_deep x param then -- GitLab