In the attached exemple, the DELETE_RULE raise an exception Not_found.
The statement DELETE_RULE Gram foo: "foo"; LIDENT; END bar is exploded as follows :

$ camlp4of -str "DELETE_RULE Gram foo: "foo"; LIDENT; bar END"
Gram.delete_rule foo
  [ Gram.Snterm (Gram.Entry.obj (foo : 'foo Gram.Entry.t));
    Gram.Stoken
      (((function | LIDENT ((_)) -> true | _ -> false), "LIDENT ((_))"));
    Gram.Snterm (Gram.Entry.obj (bar : 'bar Gram.Entry.t)) ]

while the running example is the following :
Gram.delete_rule foo
      [ Gram.Skeyword "foo";
        Gram.Stoken
          (((function | LIDENT ((_)) -> true | _ -> false), "LIDENT _"));
        Gram.Snterm (Gram.Entry.obj (bar : 'bar Gram.Entry.t)) ]

How do I write the rule DELETE_RULE to work in this case?
--
Serge Leblanc
gpg --keyserver  hkp://keyserver.ubuntu.com:11371 --recv-keys 0x33243C1B
Fingerprint = 066C 005F 5595 D85C 7673  D969 1DD4 90C4 3324 3C1B