let mk_rule str jl =
try
let jl' = List.map
(function
| Some(j) -> j
| None -> raise Not_found)
jl
in
Some(Rule(str, jl'))
with
Not_found -> None