let _ = Mltop.add_known_module "coq-core.plugins.ltac2_ltac1"

# 13 "plugins/ltac2_ltac1/g_ltac2_ltac1.mlg"
 

open Pcoq.Prim
open Ltac2_plugin
open Tac2expr
open Ltac_plugin
open Ltac2_plugin.G_ltac2

let ltac_expr = Pltac.ltac_expr

let inj_wit wit loc x = CAst.make ~loc @@ CTacExt (wit, x)

let inj_ltac1 loc e = inj_wit Tac2quote_ltac1.wit_ltac1 loc e
let inj_ltac1val loc e = inj_wit Tac2quote_ltac1.wit_ltac1val loc e



let _ = let ltac1_expr_in_env = Pcoq.Entry.make "ltac1_expr_in_env"
        in
        let () =
        Egramml.grammar_extend ~plugin_uid:("coq-core.plugins.ltac2_ltac1", "g_ltac2_ltac1.mlg:0")
        ltac2_atom
        (Pcoq.Reuse (None, [Pcoq.Production.make
                            (Pcoq.Rule.next (Pcoq.Rule.next (Pcoq.Rule.next 
                                                            (Pcoq.Rule.next 
                                                            (Pcoq.Rule.next 
                                                            (Pcoq.Rule.stop)
                                                            ((Pcoq.Symbol.token (Tok.PIDENT (Some
                                                            ("ltac1val"))))))
                                                            ((Pcoq.Symbol.token (Tok.PKEYWORD (":")))))
                                                            ((Pcoq.Symbol.token (Tok.PKEYWORD ("(")))))
                                                            ((Pcoq.Symbol.nterm ltac1_expr_in_env)))
                                            ((Pcoq.Symbol.token (Tok.PKEYWORD (")")))))
                            (fun _ qid _ _ _ loc -> 
# 34 "plugins/ltac2_ltac1/g_ltac2_ltac1.mlg"
                                                                    inj_ltac1val loc qid 
                                                    );
                           Pcoq.Production.make
                           (Pcoq.Rule.next (Pcoq.Rule.next (Pcoq.Rule.next 
                                                           (Pcoq.Rule.next 
                                                           (Pcoq.Rule.next 
                                                           (Pcoq.Rule.stop)
                                                           ((Pcoq.Symbol.token (Tok.PIDENT (Some
                                                           ("ltac1"))))))
                                                           ((Pcoq.Symbol.token (Tok.PKEYWORD (":")))))
                                                           ((Pcoq.Symbol.token (Tok.PKEYWORD ("(")))))
                                                           ((Pcoq.Symbol.nterm ltac1_expr_in_env)))
                                           ((Pcoq.Symbol.token (Tok.PKEYWORD (")")))))
                           (fun _ qid _ _ _ loc -> 
# 33 "plugins/ltac2_ltac1/g_ltac2_ltac1.mlg"
                                                                 inj_ltac1 loc qid 
                                                   )]))
        in let () = assert (Pcoq.Entry.is_empty ltac1_expr_in_env) in
        let () =
        Egramml.grammar_extend ~plugin_uid:("coq-core.plugins.ltac2_ltac1", "g_ltac2_ltac1.mlg:1")
        ltac1_expr_in_env
        (Pcoq.Fresh
        (Gramlib.Gramext.First, [(None, None,
                                 [Pcoq.Production.make
                                  (Pcoq.Rule.next (Pcoq.Rule.stop)
                                                  ((Pcoq.Symbol.nterm ltac_expr)))
                                  (fun e loc -> 
# 38 "plugins/ltac2_ltac1/g_ltac2_ltac1.mlg"
                           [], e 
                                                );
                                 Pcoq.Production.make
                                 (Pcoq.Rule.next (Pcoq.Rule.next (Pcoq.Rule.next 
                                                                 (Pcoq.Rule.next 
                                                                 (Pcoq.Rule.stop)
                                                                 ((Pcoq.Symbol.nterm test_ltac1_env)))
                                                                 ((Pcoq.Symbol.list0 (Pcoq.Symbol.nterm identref))))
                                                                 ((Pcoq.Symbol.token (Tok.PKEYWORD ("|-")))))
                                                 ((Pcoq.Symbol.nterm ltac_expr)))
                                 (fun e _ ids _ loc -> 
# 37 "plugins/ltac2_ltac1/g_ltac2_ltac1.mlg"
                                                                       ids, e 
                                                       )])]))
        in ()

