Commit e3ba88ea authored by POTTIER Francois's avatar POTTIER Francois

Re-implemented the user-visible [lhs] function using the [lhs] table,

composed with the function [nonterminal].
parent 7e37ed9c
......@@ -129,6 +129,9 @@ module type INSPECTION_TABLES = sig
val lhs: PackedIntArray.t
val terminal: int -> xsymbol
val nonterminal: int -> xsymbol
(* A mapping of every (non-initial) state to its incoming symbol. *)
val symbol: 'a lr1state -> 'a symbol
......
......@@ -184,8 +184,8 @@ module MakeInspection (T : TableFormat.INSPECTION_TABLES) = struct
data
let lhs prod =
let lhs, _ = production_def prod in
lhs
let nt = PackedIntArray.get T.lhs prod in
T.nonterminal nt
let rhs prod =
let _, rhs = production_def prod in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment