Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 713c2a15 authored by Frédéric Bour's avatar Frédéric Bour
Browse files

Update SDK to preserve backward compatibility

parent 6d8d90ea
No related tags found
No related merge requests found
......@@ -119,8 +119,11 @@ module type GRAMMAR = sig
include INDEXED with type t = lr1
val lr0 : t -> lr0
val transitions : t -> (symbol * t) list
val reductions : t -> (terminal * production) list
val get_reductions : t -> (terminal * production) list
val default_reduction : t -> production option
val reductions : t -> (terminal * production list) list
[@@@ocaml.deprecated "Please use [get_reductions]"]
end
module Print : sig
......
......@@ -214,12 +214,15 @@ module Lift (G : sig val grammar : grammar end) : GRAMMAR = struct
let table = grammar.g_lr1_states
let lr0 i = table.(i).lr1_lr0
let transitions i = table.(i).lr1_transitions
let reductions i = table.(i).lr1_reductions
let get_reductions i = table.(i).lr1_reductions
let default_reduction i = table.(i).lr1_default_reduction
include Index(struct
let name = "Lr1"
let count = Array.length table
end)
let reductions i =
List.map (fun (s, p) -> (s, [p]))
table.(i).lr1_reductions
end
module Print = struct
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment