aboutsummaryrefslogtreecommitdiff
path: root/doc/tools/docgram/orderedGrammar
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tools/docgram/orderedGrammar')
-rw-r--r--doc/tools/docgram/orderedGrammar840
1 files changed, 691 insertions, 149 deletions
diff --git a/doc/tools/docgram/orderedGrammar b/doc/tools/docgram/orderedGrammar
index f4bf51b6ba..aae96fc966 100644
--- a/doc/tools/docgram/orderedGrammar
+++ b/doc/tools/docgram/orderedGrammar
@@ -45,6 +45,7 @@ term0: [
| term_match
| term_record
| term_generalizing
+| "[|" LIST0 term SEP ";" "|" term OPT ( ":" type ) "|]" OPT univ_annot
| term_ltac
| "(" term ")"
]
@@ -92,7 +93,7 @@ term_explicit: [
]
primitive_notations: [
-| numeral
+| number
| string
]
@@ -128,20 +129,28 @@ type: [
| term
]
-numeral: [
-| OPT "-" decnum OPT ( "." LIST1 [ digit | "_" ] ) OPT ( [ "e" | "E" ] OPT [ "+" | "-" ] decnum )
-| OPT "-" hexnum OPT ( "." LIST1 [ hexdigit | "_" ] ) OPT ( [ "p" | "P" ] OPT [ "+" | "-" ] decnum )
+number: [
+| OPT "-" decnat OPT ( "." LIST1 [ digit | "_" ] ) OPT ( [ "e" | "E" ] OPT [ "+" | "-" ] decnat )
+| OPT "-" hexnat OPT ( "." LIST1 [ hexdigit | "_" ] ) OPT ( [ "p" | "P" ] OPT [ "+" | "-" ] decnat )
]
-int: [
-| OPT "-" num
+integer: [
+| OPT "-" natural
]
-num: [
-| [ decnum | hexnum ]
+natural: [
+| bignat
]
-decnum: [
+bigint: [
+| OPT "-" bignat
+]
+
+bignat: [
+| [ decnat | hexnat ]
+]
+
+decnat: [
| digit LIST0 [ digit | "_" ]
]
@@ -149,7 +158,7 @@ digit: [
| "0" ".." "9"
]
-hexnum: [
+hexnat: [
| [ "0x" | "0X" ] hexdigit LIST0 [ hexdigit | "_" ]
]
@@ -192,6 +201,32 @@ NOTINRSTS: [
| simple_tactic
| REACHABLE
| NOTINRSTS
+| l1_tactic
+| l3_tactic
+| l2_tactic
+| binder_tactic
+| value_tactic
+| ltac2_entry
+| q_intropatterns
+| q_intropattern
+| q_ident
+| q_destruction_arg
+| q_with_bindings
+| q_bindings
+| q_strategy_flag
+| q_reference
+| q_clause
+| q_occurrences
+| q_induction_clause
+| q_conversion
+| q_rewriting
+| q_dispatch
+| q_hintdb
+| q_move_location
+| q_pose
+| q_assert
+| q_constr_matching
+| q_goal_matching
]
document: [
@@ -203,7 +238,7 @@ nonterminal: [
sentence: [
| OPT attributes command "."
-| OPT attributes OPT ( num ":" ) query_command "."
+| OPT attributes OPT ( natural ":" ) query_command "."
| OPT attributes OPT ( toplevel_selector ":" ) ltac_expr [ "." | "..." ]
| control_command
]
@@ -250,7 +285,7 @@ universe: [
]
universe_expr: [
-| universe_name OPT ( "+" num )
+| universe_name OPT ( "+" natural )
]
universe_name: [
@@ -402,7 +437,7 @@ pattern0: [
| "{|" LIST0 ( qualid ":=" pattern ) "|}"
| "_"
| "(" LIST1 pattern SEP "|" ")"
-| numeral
+| number
| string
]
@@ -462,11 +497,11 @@ delta_flag: [
]
strategy_flag: [
-| LIST1 red_flags
+| LIST1 red_flag
| delta_flag
]
-red_flags: [
+red_flag: [
| "beta"
| "iota"
| "match"
@@ -482,12 +517,12 @@ ref_or_pattern_occ: [
]
occs_nums: [
-| LIST1 [ num | ident ]
-| "-" [ num | ident ] LIST0 int_or_var
+| LIST1 [ natural | ident ]
+| "-" [ natural | ident ] LIST0 int_or_var
]
int_or_var: [
-| int
+| integer
| ident
]
@@ -508,7 +543,7 @@ record_definition: [
]
record_field: [
-| LIST0 ( "#[" LIST0 attribute SEP "," "]" ) name OPT field_body OPT [ "|" num ] OPT decl_notations
+| LIST0 ( "#[" LIST0 attribute SEP "," "]" ) name OPT field_body OPT [ "|" natural ] OPT decl_notations
]
field_body: [
@@ -562,7 +597,7 @@ sort_family: [
]
hint_info: [
-| "|" OPT num OPT one_term
+| "|" OPT natural OPT one_term
]
module_binder: [
@@ -575,7 +610,7 @@ module_type_inl: [
]
functor_app_annot: [
-| "[" "inline" "at" "level" num "]"
+| "[" "inline" "at" "level" natural "]"
| "[" "no" "inline" "]"
]
@@ -659,7 +694,7 @@ scope_key: [
strategy_level: [
| "opaque"
-| int
+| integer
| "expand"
| "transparent"
]
@@ -687,7 +722,7 @@ command: [
| "Locate" reference
| "Locate" "Term" reference
| "Locate" "Module" qualid
-| "Info" num ltac_expr
+| "Info" natural ltac_expr
| "Locate" "Ltac" qualid
| "Locate" "Library" qualid
| "Locate" "File" string
@@ -735,7 +770,7 @@ command: [
| "Print" "Module" "Type" qualid
| "Print" "Module" qualid
| "Print" "Namespace" dirpath
-| "Inspect" num
+| "Inspect" natural
| "Add" "ML" "Path" string
| OPT "Export" "Set" setting_name
| "Print" "Table" setting_name
@@ -746,26 +781,46 @@ command: [
| "Restore" "State" [ ident | string ]
| "Reset" "Initial"
| "Reset" ident
-| "Back" OPT num
+| "Back" OPT natural
| "Debug" [ "On" | "Off" ]
| "Declare" "Reduction" ident ":=" red_expr
| "Declare" "Custom" "Entry" ident
| "Derive" ident "SuchThat" one_term "As" ident (* derive plugin *)
+| "Extraction" qualid (* extraction plugin *)
+| "Recursive" "Extraction" LIST1 qualid (* extraction plugin *)
+| "Extraction" string LIST1 qualid (* extraction plugin *)
+| "Extraction" "TestCompile" LIST1 qualid (* extraction plugin *)
+| "Separate" "Extraction" LIST1 qualid (* extraction plugin *)
+| "Extraction" "Library" ident (* extraction plugin *)
+| "Recursive" "Extraction" "Library" ident (* extraction plugin *)
+| "Extraction" "Language" language (* extraction plugin *)
+| "Extraction" "Inline" LIST1 qualid (* extraction plugin *)
+| "Extraction" "NoInline" LIST1 qualid (* extraction plugin *)
+| "Print" "Extraction" "Inline" (* extraction plugin *)
+| "Reset" "Extraction" "Inline" (* extraction plugin *)
+| "Extraction" "Implicit" qualid "[" LIST0 int_or_id "]" (* extraction plugin *)
+| "Extraction" "Blacklist" LIST1 ident (* extraction plugin *)
+| "Print" "Extraction" "Blacklist" (* extraction plugin *)
+| "Reset" "Extraction" "Blacklist" (* extraction plugin *)
+| "Extract" "Constant" qualid LIST0 string "=>" [ ident | string ] (* extraction plugin *)
+| "Extract" "Inlined" "Constant" qualid "=>" [ ident | string ] (* extraction plugin *)
+| "Extract" "Inductive" qualid "=>" [ ident | string ] "[" LIST0 [ ident | string ] "]" OPT string (* extraction plugin *)
+| "Show" "Extraction" (* extraction plugin *)
| "Proof"
| "Proof" "Mode" string
| "Proof" term
| "Abort" OPT [ "All" | ident ]
-| "Existential" num OPT ( ":" term ) ":=" term
+| "Existential" natural OPT ( ":" term ) ":=" term
| "Admitted"
| "Qed"
| "Save" ident
| "Defined" OPT ident
| "Restart"
-| "Undo" OPT ( OPT "To" num )
-| "Focus" OPT num
+| "Undo" OPT ( OPT "To" natural )
+| "Focus" OPT natural
| "Unfocus"
| "Unfocused"
-| "Show" OPT [ ident | num ]
+| "Show" OPT [ ident | natural ]
| "Show" "Existentials"
| "Show" "Universes"
| "Show" "Conjectures"
@@ -777,12 +832,12 @@ command: [
| "Create" "HintDb" ident OPT "discriminated"
| "Remove" "Hints" LIST1 qualid OPT ( ":" LIST1 ident )
| "Hint" hint OPT ( ":" LIST1 ident )
-| "Comments" LIST0 [ one_term | string | num ]
+| "Comments" LIST0 [ one_term | string | natural ]
| "Declare" "Instance" ident_decl LIST0 binder ":" term OPT hint_info
| "Declare" "Scope" scope_name
-| "Obligation" int OPT ( "of" ident ) OPT ( ":" term OPT ( "with" ltac_expr ) )
+| "Obligation" natural OPT ( "of" ident ) OPT ( ":" term OPT ( "with" ltac_expr ) )
| "Next" "Obligation" OPT ( "of" ident ) OPT ( "with" ltac_expr )
-| "Solve" "Obligation" int OPT ( "of" ident ) "with" ltac_expr
+| "Solve" "Obligation" natural OPT ( "of" ident ) "with" ltac_expr
| "Solve" "Obligations" OPT ( OPT ( "of" ident ) "with" ltac_expr )
| "Solve" "All" "Obligations" OPT ( "with" ltac_expr )
| "Admit" "Obligations" OPT ( "of" ident )
@@ -805,8 +860,19 @@ command: [
| "Optimize" "Proof"
| "Optimize" "Heap"
| "Reset" "Ltac" "Profile"
-| "Show" "Ltac" "Profile" OPT [ "CutOff" int | string ]
+| "Show" "Ltac" "Profile" OPT [ "CutOff" integer | string ]
| "Show" "Lia" "Profile" (* micromega plugin *)
+| "Add" "Zify" "InjTyp" one_term (* micromega plugin *)
+| "Add" "Zify" "BinOp" one_term (* micromega plugin *)
+| "Add" "Zify" "UnOp" one_term (* micromega plugin *)
+| "Add" "Zify" "CstOp" one_term (* micromega plugin *)
+| "Add" "Zify" "BinRel" one_term (* micromega plugin *)
+| "Add" "Zify" "PropOp" one_term (* micromega plugin *)
+| "Add" "Zify" "PropBinOp" one_term (* micromega plugin *)
+| "Add" "Zify" "PropUOp" one_term (* micromega plugin *)
+| "Add" "Zify" "BinOpSpec" one_term (* micromega plugin *)
+| "Add" "Zify" "UnOpSpec" one_term (* micromega plugin *)
+| "Add" "Zify" "Saturate" one_term (* micromega plugin *)
| "Add" "InjTyp" one_term (* micromega plugin *)
| "Add" "BinOp" one_term (* micromega plugin *)
| "Add" "UnOp" one_term (* micromega plugin *)
@@ -815,7 +881,6 @@ command: [
| "Add" "PropOp" one_term (* micromega plugin *)
| "Add" "PropBinOp" one_term (* micromega plugin *)
| "Add" "PropUOp" one_term (* micromega plugin *)
-| "Add" "Spec" one_term (* micromega plugin *)
| "Add" "BinOpSpec" one_term (* micromega plugin *)
| "Add" "UnOpSpec" one_term (* micromega plugin *)
| "Add" "Saturate" one_term (* micromega plugin *)
@@ -824,15 +889,21 @@ command: [
| "Show" "Zify" "UnOp" (* micromega plugin *)
| "Show" "Zify" "CstOp" (* micromega plugin *)
| "Show" "Zify" "BinRel" (* micromega plugin *)
+| "Show" "Zify" "UnOpSpec" (* micromega plugin *)
+| "Show" "Zify" "BinOpSpec" (* micromega plugin *)
| "Show" "Zify" "Spec" (* micromega plugin *)
| "Add" "Ring" ident ":" one_term OPT ( "(" LIST1 ring_mod SEP "," ")" ) (* setoid_ring plugin *)
+| "Print" "Rings" (* setoid_ring plugin *)
+| "Add" "Field" ident ":" one_term OPT ( "(" LIST1 field_mod SEP "," ")" ) (* setoid_ring plugin *)
+| "Print" "Fields" (* setoid_ring plugin *)
+| "Number" "Notation" qualid qualid qualid ":" ident OPT numeral_modifier
| "Hint" "Cut" "[" hints_path "]" OPT ( ":" LIST1 ident )
| "Typeclasses" "Transparent" LIST0 qualid
| "Typeclasses" "Opaque" LIST0 qualid
-| "Typeclasses" "eauto" ":=" OPT "debug" OPT ( "(" eauto_search_strategy_name ")" ) OPT int
+| "Typeclasses" "eauto" ":=" OPT "debug" OPT ( "(" eauto_search_strategy_name ")" ) OPT integer
| "Proof" "with" ltac_expr OPT [ "using" section_subset_expr ]
| "Proof" "using" section_subset_expr OPT [ "with" ltac_expr ]
-| "Tactic" "Notation" OPT ( "(" "at" "level" num ")" ) LIST1 ltac_production_item ":=" ltac_expr
+| "Tactic" "Notation" OPT ( "(" "at" "level" natural ")" ) LIST1 ltac_production_item ":=" ltac_expr
| "Print" "Rewrite" "HintDb" ident
| "Print" "Ltac" qualid
| "Ltac" tacdef_body LIST0 ( "with" tacdef_body )
@@ -841,26 +912,6 @@ command: [
| "Print" "Firstorder" "Solver"
| "Function" fix_definition LIST0 ( "with" fix_definition )
| "Functional" "Scheme" fun_scheme_arg LIST0 ( "with" fun_scheme_arg )
-| "Extraction" qualid (* extraction plugin *)
-| "Recursive" "Extraction" LIST1 qualid (* extraction plugin *)
-| "Extraction" string LIST1 qualid (* extraction plugin *)
-| "Extraction" "TestCompile" LIST1 qualid (* extraction plugin *)
-| "Separate" "Extraction" LIST1 qualid (* extraction plugin *)
-| "Extraction" "Library" ident (* extraction plugin *)
-| "Recursive" "Extraction" "Library" ident (* extraction plugin *)
-| "Extraction" "Language" language (* extraction plugin *)
-| "Extraction" "Inline" LIST1 qualid (* extraction plugin *)
-| "Extraction" "NoInline" LIST1 qualid (* extraction plugin *)
-| "Print" "Extraction" "Inline" (* extraction plugin *)
-| "Reset" "Extraction" "Inline" (* extraction plugin *)
-| "Extraction" "Implicit" qualid "[" LIST0 int_or_id "]" (* extraction plugin *)
-| "Extraction" "Blacklist" LIST1 ident (* extraction plugin *)
-| "Print" "Extraction" "Blacklist" (* extraction plugin *)
-| "Reset" "Extraction" "Blacklist" (* extraction plugin *)
-| "Extract" "Constant" qualid LIST0 string "=>" [ ident | string ] (* extraction plugin *)
-| "Extract" "Inlined" "Constant" qualid "=>" [ ident | string ] (* extraction plugin *)
-| "Extract" "Inductive" qualid "=>" [ ident | string ] "[" LIST0 [ ident | string ] "]" OPT string (* extraction plugin *)
-| "Show" "Extraction" (* extraction plugin *)
| "Functional" "Case" fun_scheme_arg (* funind plugin *)
| "Generate" "graph" "for" qualid (* funind plugin *)
| "Hint" "Rewrite" OPT [ "->" | "<-" ] LIST1 one_term OPT ( "using" ltac_expr ) OPT ( ":" LIST0 ident )
@@ -870,14 +921,11 @@ command: [
| "Derive" "Dependent" "Inversion_clear" ident "with" one_term "Sort" sort_family
| "Declare" "Left" "Step" one_term
| "Declare" "Right" "Step" one_term
-| "Print" "Rings" (* setoid_ring plugin *)
-| "Add" "Field" ident ":" one_term OPT ( "(" LIST1 field_mod SEP "," ")" ) (* setoid_ring plugin *)
-| "Print" "Fields" (* setoid_ring plugin *)
| "Numeral" "Notation" qualid qualid qualid ":" scope_name OPT numeral_modifier
| "String" "Notation" qualid qualid qualid ":" scope_name
| "SubClass" ident_decl def_body
| thm_token ident_decl LIST0 binder ":" type LIST0 [ "with" ident_decl LIST0 binder ":" type ]
-| assumption_token OPT ( "Inline" OPT ( "(" num ")" ) ) [ LIST1 ( "(" assumpt ")" ) | assumpt ]
+| assumption_token OPT ( "Inline" OPT ( "(" natural ")" ) ) [ LIST1 ( "(" assumpt ")" ) | assumpt ]
| [ "Definition" | "Example" ] ident_decl def_body
| "Let" ident_decl def_body
| "Inductive" inductive_definition LIST0 ( "with" inductive_definition )
@@ -889,7 +937,7 @@ command: [
| "Combined" "Scheme" ident "from" LIST1 ident SEP ","
| "Register" qualid "as" qualid
| "Register" "Inline" qualid
-| "Primitive" ident OPT [ ":" term ] ":=" "#" ident
+| "Primitive" ident_decl OPT [ ":" term ] ":=" "#" ident
| "Universe" LIST1 ident
| "Universes" LIST1 ident
| "Constraint" LIST1 univ_constraint SEP ","
@@ -920,24 +968,24 @@ command: [
| "Context" LIST1 binder
| "Instance" OPT ( ident_decl LIST0 binder ) ":" term OPT hint_info OPT [ ":=" "{" LIST0 field_def "}" | ":=" term ]
| "Existing" "Instance" qualid OPT hint_info
-| "Existing" "Instances" LIST1 qualid OPT [ "|" num ]
+| "Existing" "Instances" LIST1 qualid OPT [ "|" natural ]
| "Existing" "Class" qualid
| "Arguments" reference LIST0 arg_specs LIST0 [ "," LIST0 implicits_alt ] OPT [ ":" LIST1 args_modifier SEP "," ]
| "Implicit" [ "Type" | "Types" ] reserv_list
| "Generalizable" [ [ "Variable" | "Variables" ] LIST1 ident | "All" "Variables" | "No" "Variables" ]
-| "Set" setting_name OPT [ int | string ]
+| "Set" setting_name OPT [ integer | string ]
| "Unset" setting_name
| "Open" "Scope" scope
| "Close" "Scope" scope
| "Delimit" "Scope" scope_name "with" scope_key
| "Undelimit" "Scope" scope_name
| "Bind" "Scope" scope_name "with" LIST1 class
-| "Infix" string ":=" one_term OPT [ "(" LIST1 syntax_modifier SEP "," ")" ] OPT [ ":" scope_name ]
+| "Infix" string ":=" one_term OPT ( "(" LIST1 syntax_modifier SEP "," ")" ) OPT [ ":" scope_name ]
| "Notation" ident LIST0 ident ":=" one_term OPT ( "(" "only" "parsing" ")" )
-| "Notation" string ":=" one_term OPT [ "(" LIST1 syntax_modifier SEP "," ")" ] OPT [ ":" scope_name ]
+| "Notation" string ":=" one_term OPT ( "(" LIST1 syntax_modifier SEP "," ")" ) OPT [ ":" scope_name ]
| "Format" "Notation" string string string
-| "Reserved" "Infix" string OPT [ "(" LIST1 syntax_modifier SEP "," ")" ]
-| "Reserved" "Notation" string OPT [ "(" LIST1 syntax_modifier SEP "," ")" ]
+| "Reserved" "Infix" string OPT ( "(" LIST1 syntax_modifier SEP "," ")" )
+| "Reserved" "Notation" string OPT ( "(" LIST1 syntax_modifier SEP "," ")" )
| "Eval" red_expr "in" term
| "Compute" term
| "Check" term
@@ -946,14 +994,22 @@ command: [
| "SearchPattern" one_term OPT ( [ "inside" | "outside" ] LIST1 qualid )
| "SearchRewrite" one_term OPT ( [ "inside" | "outside" ] LIST1 qualid )
| "Search" LIST1 ( search_query ) OPT ( [ "inside" | "outside" ] LIST1 qualid )
+| "Ltac2" OPT "mutable" OPT "rec" tac2def_body LIST0 ( "with" tac2def_body )
+| "Ltac2" "Type" OPT "rec" tac2typ_def LIST0 ( "with" tac2typ_def )
+| "Ltac2" "@" "external" ident ":" ltac2_type ":=" string string
+| "Ltac2" "Notation" LIST1 ltac2_scope OPT ( ":" natural ) ":=" ltac2_expr
+| "Ltac2" "Set" qualid OPT [ "as" ident ] ":=" ltac2_expr
+| "Ltac2" "Notation" [ string | lident ] ":=" ltac2_expr (* Ltac2 plugin *)
+| "Ltac2" "Eval" ltac2_expr (* Ltac2 plugin *)
+| "Print" "Ltac2" qualid (* Ltac2 plugin *)
| "Time" sentence
| "Redirect" string sentence
-| "Timeout" num sentence
+| "Timeout" natural sentence
| "Fail" sentence
| "Drop"
| "Quit"
-| "BackTo" num
-| "Show" "Goal" num "at" num
+| "BackTo" natural
+| "Show" "Goal" natural "at" natural
]
section_subset_expr: [
@@ -1020,8 +1076,8 @@ univ_name_list: [
hint: [
| "Resolve" LIST1 [ qualid | one_term ] OPT hint_info
-| "Resolve" "->" LIST1 qualid OPT num
-| "Resolve" "<-" LIST1 qualid OPT num
+| "Resolve" "->" LIST1 qualid OPT natural
+| "Resolve" "<-" LIST1 qualid OPT natural
| "Immediate" LIST1 [ qualid | one_term ]
| "Variables" "Transparent"
| "Variables" "Opaque"
@@ -1032,7 +1088,7 @@ hint: [
| "Mode" qualid LIST1 [ "+" | "!" | "-" ]
| "Unfold" LIST1 qualid
| "Constructors" LIST1 qualid
-| "Extern" num OPT one_term "=>" ltac_expr
+| "Extern" natural OPT one_term "=>" ltac_expr
]
tacdef_body: [
@@ -1044,9 +1100,171 @@ ltac_production_item: [
| ident OPT ( "(" ident OPT ( "," string ) ")" )
]
+tac2expr_in_env: [
+| LIST0 ident "|-" ltac2_expr (* Ltac2 plugin *)
+| ltac2_expr (* Ltac2 plugin *)
+]
+
+ltac2_type: [
+| ltac2_type2 "->" ltac2_type (* Ltac2 plugin *)
+| ltac2_type2 (* Ltac2 plugin *)
+]
+
+ltac2_type2: [
+| ltac2_type1 "*" LIST1 ltac2_type1 SEP "*" (* Ltac2 plugin *)
+| ltac2_type1 (* Ltac2 plugin *)
+]
+
+ltac2_type1: [
+| ltac2_type0 qualid (* Ltac2 plugin *)
+| ltac2_type0 (* Ltac2 plugin *)
+]
+
+ltac2_type0: [
+| "(" LIST1 ltac2_type SEP "," ")" OPT qualid (* Ltac2 plugin *)
+| ltac2_typevar (* Ltac2 plugin *)
+| "_" (* Ltac2 plugin *)
+| qualid (* Ltac2 plugin *)
+]
+
+ltac2_typevar: [
+| "'" ident (* Ltac2 plugin *)
+]
+
+lident: [
+| ident (* Ltac2 plugin *)
+]
+
+destruction_arg: [
+| natural
+| constr_with_bindings
+| constr_with_bindings_arg
+]
+
+constr_with_bindings_arg: [
+| ">" constr_with_bindings
+| constr_with_bindings
+]
+
+clause_dft_concl: [
+| "in" in_clause
+| OPT ( "at" occs_nums )
+]
+
+in_clause: [
+| "*" OPT ( "at" occs_nums )
+| "*" "|-" OPT concl_occ
+| LIST0 hypident_occ SEP "," OPT ( "|-" OPT concl_occ )
+]
+
+hypident_occ: [
+| hypident OPT ( "at" occs_nums )
+]
+
+hypident: [
+| ident
+| "(" "type" "of" ident ")"
+| "(" "value" "of" ident ")"
+]
+
+concl_occ: [
+| "*" OPT ( "at" occs_nums )
+]
+
+q_intropatterns: [
+| ltac2_intropatterns (* Ltac2 plugin *)
+]
+
+ltac2_intropatterns: [
+| LIST0 nonsimple_intropattern (* Ltac2 plugin *)
+]
+
+nonsimple_intropattern: [
+| "*" (* Ltac2 plugin *)
+| "**" (* Ltac2 plugin *)
+| ltac2_simple_intropattern (* Ltac2 plugin *)
+]
+
+q_intropattern: [
+| ltac2_simple_intropattern (* Ltac2 plugin *)
+]
+
+ltac2_simple_intropattern: [
+| ltac2_naming_intropattern (* Ltac2 plugin *)
+| "_" (* Ltac2 plugin *)
+| ltac2_or_and_intropattern (* Ltac2 plugin *)
+| ltac2_equality_intropattern (* Ltac2 plugin *)
+]
+
+ltac2_or_and_intropattern: [
+| "[" LIST1 ltac2_intropatterns SEP "|" "]" (* Ltac2 plugin *)
+| "()" (* Ltac2 plugin *)
+| "(" LIST1 ltac2_simple_intropattern SEP "," ")" (* Ltac2 plugin *)
+| "(" LIST1 ltac2_simple_intropattern SEP "&" ")" (* Ltac2 plugin *)
+]
+
+ltac2_equality_intropattern: [
+| "->" (* Ltac2 plugin *)
+| "<-" (* Ltac2 plugin *)
+| "[=" ltac2_intropatterns "]" (* Ltac2 plugin *)
+]
+
+ltac2_naming_intropattern: [
+| "?" lident (* Ltac2 plugin *)
+| "?$" lident (* Ltac2 plugin *)
+| "?" (* Ltac2 plugin *)
+| ident_or_anti (* Ltac2 plugin *)
+]
+
+q_ident: [
+| ident_or_anti (* Ltac2 plugin *)
+]
+
+ident_or_anti: [
+| lident (* Ltac2 plugin *)
+| "$" ident (* Ltac2 plugin *)
+]
+
+q_destruction_arg: [
+| ltac2_destruction_arg (* Ltac2 plugin *)
+]
+
+ltac2_destruction_arg: [
+| natural (* Ltac2 plugin *)
+| lident (* Ltac2 plugin *)
+| ltac2_constr_with_bindings (* Ltac2 plugin *)
+]
+
+ltac2_constr_with_bindings: [
+| term OPT ( "with" ltac2_bindings ) (* Ltac2 plugin *)
+]
+
+q_bindings: [
+| ltac2_bindings (* Ltac2 plugin *)
+]
+
+q_with_bindings: [
+| OPT ( "with" ltac2_bindings ) (* Ltac2 plugin *)
+]
+
+ltac2_bindings: [
+| LIST1 ltac2_simple_binding (* Ltac2 plugin *)
+| LIST1 term (* Ltac2 plugin *)
+]
+
+ltac2_simple_binding: [
+| "(" qhyp ":=" term ")" (* Ltac2 plugin *)
+]
+
+qhyp: [
+| "$" ident (* Ltac2 plugin *)
+| natural (* Ltac2 plugin *)
+| lident (* Ltac2 plugin *)
+]
+
int_or_id: [
-| ident (* extraction plugin *)
-| int (* extraction plugin *)
+| ident
+| integer (* extraction plugin *)
]
language: [
@@ -1082,8 +1300,8 @@ field_mod: [
]
numeral_modifier: [
-| "(" "warning" "after" numeral ")"
-| "(" "abstract" "after" numeral ")"
+| "(" "warning" "after" bignat ")"
+| "(" "abstract" "after" bignat ")"
]
hints_path: [
@@ -1109,8 +1327,8 @@ class: [
]
syntax_modifier: [
-| "at" "level" num
-| "in" "custom" ident OPT ( "at" "level" num )
+| "at" "level" natural
+| "in" "custom" ident OPT ( "at" "level" natural )
| LIST1 ident SEP "," "at" level
| ident "at" level OPT binder_interp
| ident explicit_subentry
@@ -1127,12 +1345,12 @@ explicit_subentry: [
| "ident"
| "global"
| "bigint"
-| "strict" "pattern" OPT ( "at" "level" num )
+| "strict" "pattern" OPT ( "at" "level" natural )
| "binder"
| "closed" "binder"
| "constr" OPT ( "at" level ) OPT binder_interp
| "custom" ident OPT ( "at" level ) OPT binder_interp
-| "pattern" OPT ( "at" "level" num )
+| "pattern" OPT ( "at" "level" natural )
]
binder_interp: [
@@ -1142,7 +1360,7 @@ binder_interp: [
]
level: [
-| "level" num
+| "level" natural
| "next" "level"
]
@@ -1151,7 +1369,7 @@ decl_notations: [
]
decl_notation: [
-| string ":=" one_term OPT ( "(" "only" "parsing" ")" ) OPT [ ":" scope_name ]
+| string ":=" one_term OPT ( "(" LIST1 syntax_modifier SEP "," ")" ) OPT [ ":" scope_name ]
]
simple_tactic: [
@@ -1179,14 +1397,14 @@ simple_tactic: [
| "esplit" OPT ( "with" bindings )
| "exists" OPT ( LIST1 bindings SEP "," )
| "eexists" OPT ( LIST1 bindings SEP "," )
-| "intros" "until" [ ident | num ]
+| "intros" "until" [ ident | natural ]
| "intro" OPT ident OPT where
| "move" ident OPT where
| "rename" LIST1 ( ident "into" ident ) SEP ","
| "revert" LIST1 ident
-| "simple" "induction" [ ident | num ]
-| "simple" "destruct" [ ident | num ]
-| "double" "induction" [ ident | num ] [ ident | num ]
+| "simple" "induction" [ ident | natural ]
+| "simple" "destruct" [ ident | natural ]
+| "double" "induction" [ ident | natural ] [ ident | natural ]
| "admit"
| "clear" LIST0 ident
| "clear" "-" LIST1 ident
@@ -1208,8 +1426,9 @@ simple_tactic: [
| "tryif" ltac_expr "then" ltac_expr "else" ltac_expr2
| "first" "[" LIST0 ltac_expr SEP "|" "]"
| "solve" "[" LIST0 ltac_expr SEP "|" "]"
-| "idtac" LIST0 [ ident | string | int ]
-| [ "fail" | "gfail" ] OPT int_or_var LIST0 [ ident | string | int ]
+| "idtac" LIST0 [ ident | string | natural ]
+| [ "fail" | "gfail" ] OPT int_or_var LIST0 [ ident | string | natural ]
+| "fun" LIST1 name "=>" ltac_expr
| "eval" red_expr "in" term
| "context" ident "[" term "]"
| "type" "of" term
@@ -1219,13 +1438,14 @@ simple_tactic: [
| "uconstr" ":" "(" term ")"
| "fun" LIST1 name "=>" ltac_expr
| "let" OPT "rec" let_clause LIST0 ( "with" let_clause ) "in" ltac_expr
-| "info" ltac_expr
| ltac_expr3 ";" [ ltac_expr3 | binder_tactic ]
| ltac_expr3 ";" "[" for_each_goal "]"
| ltac_expr1 "+" [ ltac_expr2 | binder_tactic ]
| ltac_expr1 "||" [ ltac_expr2 | binder_tactic ]
| "[>" for_each_goal "]"
| toplevel_selector ":" ltac_expr
+| ltac2_match_key ltac2_expr "with" ltac2_match_list "end"
+| ltac2_match_key OPT "reverse" "goal" "with" goal_match_list "end"
| "simplify_eq" OPT destruction_arg
| "esimplify_eq" OPT destruction_arg
| "discriminate" OPT destruction_arg
@@ -1234,7 +1454,6 @@ simple_tactic: [
| "einjection" OPT destruction_arg OPT ( "as" LIST0 simple_intropattern )
| "simple" "injection" OPT destruction_arg
| "dependent" "rewrite" OPT [ "->" | "<-" ] one_term OPT ( "in" ident )
-| "cutrewrite" OPT [ "->" | "<-" ] one_term OPT ( "in" ident )
| "decompose" "sum" one_term
| "decompose" "record" one_term
| "absurd" one_term
@@ -1252,7 +1471,7 @@ simple_tactic: [
| "evar" "(" ident ":" term ")"
| "evar" one_term
| "instantiate" "(" ident ":=" term ")"
-| "instantiate" "(" int ":=" term ")" OPT hloc
+| "instantiate" "(" integer ":=" term ")" OPT hloc
| "instantiate"
| "stepl" one_term OPT ( "by" ltac_expr )
| "stepr" one_term OPT ( "by" ltac_expr )
@@ -1291,7 +1510,7 @@ simple_tactic: [
| "start" "ltac" "profiling"
| "stop" "ltac" "profiling"
| "reset" "ltac" "profile"
-| "show" "ltac" "profile" OPT [ "cutoff" int | string ]
+| "show" "ltac" "profile" OPT [ "cutoff" integer | string ]
| "restart_timer" OPT string
| "finish_timing" OPT ( "(" string ")" ) OPT string
| "eassumption"
@@ -1329,10 +1548,10 @@ simple_tactic: [
| "setoid_reflexivity"
| "setoid_transitivity" one_term
| "setoid_etransitivity"
-| "decide" "equality"
-| "compare" one_term one_term
| "intros" LIST0 intropattern
| "eintros" LIST0 intropattern
+| "decide" "equality"
+| "compare" one_term one_term
| "apply" LIST1 constr_with_bindings_arg SEP "," OPT in_hyp_as
| "eapply" LIST1 constr_with_bindings_arg SEP "," OPT in_hyp_as
| "simple" "apply" LIST1 constr_with_bindings_arg SEP "," OPT in_hyp_as
@@ -1341,7 +1560,7 @@ simple_tactic: [
| "eelim" constr_with_bindings_arg OPT ( "using" constr_with_bindings )
| "case" induction_clause_list
| "ecase" induction_clause_list
-| "fix" ident num OPT ( "with" LIST1 fixdecl )
+| "fix" ident natural OPT ( "with" LIST1 fixdecl )
| "cofix" ident OPT ( "with" LIST1 cofixdecl )
| "pose" bindings_with_parameters
| "pose" one_term OPT as_name
@@ -1375,11 +1594,11 @@ simple_tactic: [
| "edestruct" induction_clause_list
| "rewrite" LIST1 oriented_rewriter SEP "," OPT clause_dft_concl OPT ( "by" ltac_expr3 )
| "erewrite" LIST1 oriented_rewriter SEP "," OPT clause_dft_concl OPT ( "by" ltac_expr3 )
-| "dependent" [ "simple" "inversion" | "inversion" | "inversion_clear" ] [ ident | num ] OPT as_or_and_ipat OPT [ "with" one_term ]
-| "simple" "inversion" [ ident | num ] OPT as_or_and_ipat OPT ( "in" LIST1 ident )
-| "inversion" [ ident | num ] OPT as_or_and_ipat OPT ( "in" LIST1 ident )
-| "inversion_clear" [ ident | num ] OPT as_or_and_ipat OPT ( "in" LIST1 ident )
-| "inversion" [ ident | num ] "using" one_term OPT ( "in" LIST1 ident )
+| "dependent" [ "simple" "inversion" | "inversion" | "inversion_clear" ] [ ident | natural ] OPT as_or_and_ipat OPT [ "with" one_term ]
+| "simple" "inversion" [ ident | natural ] OPT as_or_and_ipat OPT ( "in" LIST1 ident )
+| "inversion" [ ident | natural ] OPT as_or_and_ipat OPT ( "in" LIST1 ident )
+| "inversion_clear" [ ident | natural ] OPT as_or_and_ipat OPT ( "in" LIST1 ident )
+| "inversion" [ ident | natural ] "using" one_term OPT ( "in" LIST1 ident )
| "red" OPT clause_dft_concl
| "hnf" OPT clause_dft_concl
| "simpl" OPT delta_flag OPT ref_or_pattern_occ OPT clause_dft_concl
@@ -1396,11 +1615,11 @@ simple_tactic: [
| "change_no_check" conversion OPT clause_dft_concl
| "btauto"
| "rtauto"
-| "congruence" OPT int OPT ( "with" LIST1 one_term )
+| "congruence" OPT natural OPT ( "with" LIST1 one_term )
| "f_equal"
| "firstorder" OPT ltac_expr firstorder_rhs
| "gintuition" OPT ltac_expr
-| "functional" "inversion" [ ident | num ] OPT qualid (* funind plugin *)
+| "functional" "inversion" [ ident | natural ] OPT qualid (* funind plugin *)
| "functional" "induction" term OPT fun_ind_using OPT with_names (* funind plugin *)
| "soft" "functional" "induction" LIST1 one_term OPT fun_ind_using OPT with_names (* funind plugin *)
| "psatz_Z" OPT int_or_var ltac_expr
@@ -1453,6 +1672,7 @@ simple_tactic: [
| "psatz" term OPT int_or_var
| "ring" OPT ( "[" LIST1 term "]" )
| "ring_simplify" OPT ( "[" LIST1 term "]" ) LIST1 term OPT ( "in" ident )
+| "match" ltac2_expr5 "with" OPT ltac2_branches "end"
| qualid LIST1 tactic_arg
]
@@ -1465,26 +1685,6 @@ hloc: [
| "in" "(" "value" "of" ident ")"
]
-in_clause: [
-| LIST0 hypident_occ SEP "," OPT ( "|-" OPT concl_occ )
-| "*" "|-" OPT concl_occ
-| "*" OPT ( "at" occs_nums )
-]
-
-concl_occ: [
-| "*" OPT ( "at" occs_nums )
-]
-
-hypident_occ: [
-| hypident OPT ( "at" occs_nums )
-]
-
-hypident: [
-| ident
-| "(" "type" "of" ident ")"
-| "(" "value" "of" ident ")"
-]
-
as_ipat: [
| "as" simple_intropattern
]
@@ -1507,12 +1707,7 @@ as_name: [
]
rewriter: [
-| "!" constr_with_bindings_arg
-| "?" constr_with_bindings_arg
-| num "!" constr_with_bindings_arg
-| num [ "?" | "?" ] constr_with_bindings_arg
-| num constr_with_bindings_arg
-| constr_with_bindings_arg
+| OPT natural OPT [ "?" | "!" ] constr_with_bindings_arg
]
oriented_rewriter: [
@@ -1554,9 +1749,9 @@ naming_intropattern: [
]
intropattern: [
-| simple_intropattern
| "*"
| "**"
+| simple_intropattern
]
simple_intropattern: [
@@ -1572,7 +1767,7 @@ simple_intropattern_closed: [
simple_binding: [
| "(" ident ":=" term ")"
-| "(" num ":=" term ")"
+| "(" natural ":=" term ")"
]
bindings: [
@@ -1597,9 +1792,367 @@ bindings_with_parameters: [
| "(" ident LIST0 simple_binder ":=" term ")"
]
-clause_dft_concl: [
-| "in" in_clause
-| OPT ( "at" occs_nums )
+q_clause: [
+| ltac2_clause (* Ltac2 plugin *)
+]
+
+ltac2_clause: [
+| "in" ltac2_in_clause (* Ltac2 plugin *)
+| "at" ltac2_occs_nums (* Ltac2 plugin *)
+]
+
+ltac2_in_clause: [
+| "*" OPT ltac2_occs (* Ltac2 plugin *)
+| "*" "|-" OPT ltac2_concl_occ (* Ltac2 plugin *)
+| LIST0 ltac2_hypident_occ SEP "," OPT ( "|-" OPT ltac2_concl_occ ) (* Ltac2 plugin *)
+]
+
+q_occurrences: [
+| OPT ltac2_occs (* Ltac2 plugin *)
+]
+
+ltac2_occs: [
+| "at" ltac2_occs_nums (* Ltac2 plugin *)
+]
+
+ltac2_occs_nums: [
+| OPT "-" LIST1 [ natural (* Ltac2 plugin *) | "$" ident ] (* Ltac2 plugin *)
+]
+
+ltac2_concl_occ: [
+| "*" OPT ltac2_occs (* Ltac2 plugin *)
+]
+
+ltac2_hypident_occ: [
+| ltac2_hypident OPT ltac2_occs (* Ltac2 plugin *)
+]
+
+ltac2_hypident: [
+| ident_or_anti (* Ltac2 plugin *)
+| "(" "type" "of" ident_or_anti ")" (* Ltac2 plugin *)
+| "(" "value" "of" ident_or_anti ")" (* Ltac2 plugin *)
+]
+
+q_induction_clause: [
+| ltac2_induction_clause (* Ltac2 plugin *)
+]
+
+ltac2_induction_clause: [
+| ltac2_destruction_arg OPT ltac2_as_or_and_ipat OPT ltac2_eqn_ipat OPT ltac2_clause (* Ltac2 plugin *)
+]
+
+ltac2_as_or_and_ipat: [
+| "as" ltac2_or_and_intropattern (* Ltac2 plugin *)
+]
+
+ltac2_eqn_ipat: [
+| "eqn" ":" ltac2_naming_intropattern (* Ltac2 plugin *)
+]
+
+q_conversion: [
+| ltac2_conversion (* Ltac2 plugin *)
+]
+
+ltac2_conversion: [
+| term (* Ltac2 plugin *)
+| term "with" term (* Ltac2 plugin *)
+]
+
+q_rewriting: [
+| ltac2_oriented_rewriter (* Ltac2 plugin *)
+]
+
+ltac2_oriented_rewriter: [
+| [ "->" | "<-" ] ltac2_rewriter (* Ltac2 plugin *)
+]
+
+ltac2_rewriter: [
+| OPT natural OPT [ "?" | "!" ] ltac2_constr_with_bindings
+]
+
+q_dispatch: [
+| ltac2_for_each_goal (* Ltac2 plugin *)
+]
+
+ltac2_for_each_goal: [
+| ltac2_goal_tactics (* Ltac2 plugin *)
+| OPT ( ltac2_goal_tactics "|" ) OPT ltac2_expr ".." OPT ( "|" ltac2_goal_tactics ) (* Ltac2 plugin *)
+]
+
+ltac2_goal_tactics: [
+| LIST0 ( OPT ltac2_expr ) SEP "|" (* Ltac2 plugin *)
+]
+
+q_strategy_flag: [
+| ltac2_strategy_flag (* Ltac2 plugin *)
+]
+
+ltac2_strategy_flag: [
+| LIST1 ltac2_red_flag (* Ltac2 plugin *)
+| OPT ltac2_delta_flag (* Ltac2 plugin *)
+]
+
+ltac2_red_flag: [
+| "beta" (* Ltac2 plugin *)
+| "iota" (* Ltac2 plugin *)
+| "match" (* Ltac2 plugin *)
+| "fix" (* Ltac2 plugin *)
+| "cofix" (* Ltac2 plugin *)
+| "zeta" (* Ltac2 plugin *)
+| "delta" OPT ltac2_delta_flag (* Ltac2 plugin *)
+]
+
+ltac2_delta_flag: [
+| OPT "-" "[" LIST1 refglobal "]"
+]
+
+q_reference: [
+| refglobal (* Ltac2 plugin *)
+]
+
+refglobal: [
+| "&" ident (* Ltac2 plugin *)
+| qualid (* Ltac2 plugin *)
+| "$" ident (* Ltac2 plugin *)
+]
+
+q_hintdb: [
+| hintdb (* Ltac2 plugin *)
+]
+
+hintdb: [
+| "*" (* Ltac2 plugin *)
+| LIST1 ident_or_anti (* Ltac2 plugin *)
+]
+
+q_constr_matching: [
+| ltac2_match_list (* Ltac2 plugin *)
+]
+
+ltac2_match_key: [
+| "lazy_match!"
+| "match!"
+| "multi_match!"
+]
+
+ltac2_match_list: [
+| OPT "|" LIST1 ltac2_match_rule SEP "|"
+]
+
+ltac2_match_rule: [
+| ltac2_match_pattern "=>" ltac2_expr (* Ltac2 plugin *)
+]
+
+ltac2_match_pattern: [
+| cpattern (* Ltac2 plugin *)
+| "context" OPT ident "[" cpattern "]" (* Ltac2 plugin *)
+]
+
+q_goal_matching: [
+| goal_match_list (* Ltac2 plugin *)
+]
+
+goal_match_list: [
+| OPT "|" LIST1 gmatch_rule SEP "|"
+]
+
+gmatch_rule: [
+| gmatch_pattern "=>" ltac2_expr (* Ltac2 plugin *)
+]
+
+gmatch_pattern: [
+| "[" LIST0 gmatch_hyp_pattern SEP "," "|-" ltac2_match_pattern "]" (* Ltac2 plugin *)
+]
+
+gmatch_hyp_pattern: [
+| name ":" ltac2_match_pattern (* Ltac2 plugin *)
+]
+
+q_move_location: [
+| move_location (* Ltac2 plugin *)
+]
+
+move_location: [
+| "at" "top" (* Ltac2 plugin *)
+| "at" "bottom" (* Ltac2 plugin *)
+| "after" ident_or_anti (* Ltac2 plugin *)
+| "before" ident_or_anti (* Ltac2 plugin *)
+]
+
+q_pose: [
+| pose (* Ltac2 plugin *)
+]
+
+pose: [
+| "(" ident_or_anti ":=" term ")" (* Ltac2 plugin *)
+| term OPT ltac2_as_name (* Ltac2 plugin *)
+]
+
+ltac2_as_name: [
+| "as" ident_or_anti (* Ltac2 plugin *)
+]
+
+q_assert: [
+| assertion (* Ltac2 plugin *)
+]
+
+assertion: [
+| "(" ident_or_anti ":=" term ")" (* Ltac2 plugin *)
+| "(" ident_or_anti ":" term ")" OPT ltac2_by_tactic (* Ltac2 plugin *)
+| term OPT ltac2_as_ipat OPT ltac2_by_tactic (* Ltac2 plugin *)
+]
+
+ltac2_as_ipat: [
+| "as" ltac2_simple_intropattern (* Ltac2 plugin *)
+]
+
+ltac2_by_tactic: [
+| "by" ltac2_expr (* Ltac2 plugin *)
+]
+
+ltac2_entry: [
+]
+
+tac2def_body: [
+| [ "_" | ident ] LIST0 tac2pat0 ":=" ltac2_expr (* Ltac2 plugin *)
+]
+
+tac2typ_def: [
+| OPT tac2typ_prm qualid OPT ( [ ":=" | "::=" ] tac2typ_knd ) (* Ltac2 plugin *)
+]
+
+tac2typ_prm: [
+| ltac2_typevar (* Ltac2 plugin *)
+| "(" LIST1 ltac2_typevar SEP "," ")" (* Ltac2 plugin *)
+]
+
+tac2typ_knd: [
+| ltac2_type (* Ltac2 plugin *)
+| "[" OPT ( OPT "|" LIST1 tac2alg_constructor SEP "|" ) "]" (* Ltac2 plugin *)
+| "[" ".." "]" (* Ltac2 plugin *)
+| "{" OPT ( LIST1 tac2rec_field SEP ";" OPT ";" ) "}" (* Ltac2 plugin *)
+]
+
+tac2alg_constructor: [
+| ident (* Ltac2 plugin *)
+| ident "(" LIST0 ltac2_type SEP "," ")" (* Ltac2 plugin *)
+]
+
+tac2rec_field: [
+| OPT "mutable" ident ":" ltac2_type (* Ltac2 plugin *)
+]
+
+ltac2_scope: [
+| string (* Ltac2 plugin *)
+| integer (* Ltac2 plugin *)
+| name (* Ltac2 plugin *)
+| name "(" LIST1 ltac2_scope SEP "," ")" (* Ltac2 plugin *)
+]
+
+ltac2_expr: [
+| ltac2_expr5 ";" ltac2_expr (* Ltac2 plugin *)
+| ltac2_expr5 (* Ltac2 plugin *)
+]
+
+ltac2_expr5: [
+| "fun" LIST1 tac2pat0 "=>" ltac2_expr (* Ltac2 plugin *)
+| "let" OPT "rec" ltac2_let_clause LIST0 ( "with" ltac2_let_clause ) "in" ltac2_expr (* Ltac2 plugin *)
+| ltac2_expr3 (* Ltac2 plugin *)
+]
+
+ltac2_let_clause: [
+| LIST1 tac2pat0 ":=" ltac2_expr (* Ltac2 plugin *)
+]
+
+ltac2_expr3: [
+| LIST1 ltac2_expr2 SEP "," (* Ltac2 plugin *)
+]
+
+ltac2_expr2: [
+| ltac2_expr1 "::" ltac2_expr2 (* Ltac2 plugin *)
+| ltac2_expr1 (* Ltac2 plugin *)
+]
+
+ltac2_expr1: [
+| ltac2_expr0 LIST1 ltac2_expr0 (* Ltac2 plugin *)
+| ltac2_expr0 ".(" qualid ")" (* Ltac2 plugin *)
+| ltac2_expr0 ".(" qualid ")" ":=" ltac2_expr5 (* Ltac2 plugin *)
+| ltac2_expr0 (* Ltac2 plugin *)
+]
+
+tac2rec_fieldexpr: [
+| qualid ":=" ltac2_expr1 (* Ltac2 plugin *)
+]
+
+ltac2_expr0: [
+| "(" ltac2_expr ")" (* Ltac2 plugin *)
+| "(" ltac2_expr ":" ltac2_type ")" (* Ltac2 plugin *)
+| "()" (* Ltac2 plugin *)
+| "[" LIST0 ltac2_expr5 SEP ";" "]" (* Ltac2 plugin *)
+| "{" OPT ( LIST1 tac2rec_fieldexpr OPT ";" ) "}" (* Ltac2 plugin *)
+| ltac2_tactic_atom (* Ltac2 plugin *)
+]
+
+ltac2_tactic_atom: [
+| integer (* Ltac2 plugin *)
+| string (* Ltac2 plugin *)
+| qualid (* Ltac2 plugin *)
+| "@" ident (* Ltac2 plugin *)
+| "&" lident (* Ltac2 plugin *)
+| "'" term (* Ltac2 plugin *)
+| ltac2_quotations
+]
+
+ltac2_quotations: [
+| "ident" ":" "(" lident ")"
+| "constr" ":" "(" term ")"
+| "open_constr" ":" "(" term ")"
+| "pattern" ":" "(" cpattern ")"
+| "reference" ":" "(" [ "&" ident | qualid ] ")"
+| "ltac1" ":" "(" ltac1_expr_in_env ")"
+| "ltac1val" ":" "(" ltac1_expr_in_env ")"
+]
+
+ltac1_expr_in_env: [
+| ltac_expr (* Ltac2 plugin *)
+| LIST0 ident "|-" ltac_expr (* Ltac2 plugin *)
+]
+
+ltac2_branches: [
+| OPT "|" LIST1 ( tac2pat1 "=>" ltac2_expr ) SEP "|"
+]
+
+tac2pat1: [
+| qualid LIST1 tac2pat0 (* Ltac2 plugin *)
+| qualid (* Ltac2 plugin *)
+| "[" "]" (* Ltac2 plugin *)
+| tac2pat0 "::" tac2pat0 (* Ltac2 plugin *)
+| tac2pat0 (* Ltac2 plugin *)
+]
+
+tac2pat0: [
+| "_" (* Ltac2 plugin *)
+| "()" (* Ltac2 plugin *)
+| qualid (* Ltac2 plugin *)
+| "(" OPT atomic_tac2pat ")" (* Ltac2 plugin *)
+]
+
+atomic_tac2pat: [
+| tac2pat1 ":" ltac2_type (* Ltac2 plugin *)
+| tac2pat1 "," LIST0 tac2pat1 SEP "," (* Ltac2 plugin *)
+| tac2pat1 (* Ltac2 plugin *)
+]
+
+tac2mode: [
+| ltac2_expr [ "." | "..." ] (* Ltac2 plugin *)
+| "Eval" red_expr "in" term
+| "Compute" term
+| "Check" term
+| "About" reference OPT univ_name_list
+| "SearchHead" one_term OPT ( [ "inside" | "outside" ] LIST1 qualid )
+| "SearchPattern" one_term OPT ( [ "inside" | "outside" ] LIST1 qualid )
+| "SearchRewrite" one_term OPT ( [ "inside" | "outside" ] LIST1 qualid )
+| "Search" LIST1 ( search_query ) OPT ( [ "inside" | "outside" ] LIST1 qualid )
]
clause_dft_all: [
@@ -1636,17 +2189,6 @@ constr_with_bindings: [
| one_term OPT ( "with" bindings )
]
-destruction_arg: [
-| num
-| constr_with_bindings
-| constr_with_bindings_arg
-]
-
-constr_with_bindings_arg: [
-| ">" constr_with_bindings
-| constr_with_bindings
-]
-
conversion: [
| one_term
| one_term "with" one_term
@@ -1668,7 +2210,7 @@ with_names: [
]
occurrences: [
-| LIST1 int
+| LIST1 integer
| ident
]
@@ -1763,7 +2305,7 @@ ltac_expr0: [
]
tactic_atom: [
-| int
+| integer
| qualid
| "()"
]
@@ -1795,8 +2337,8 @@ selector: [
]
range_selector: [
-| num "-" num
-| num
+| natural "-" natural
+| natural
]
match_key: [