I have modified the grammar for idts (sequences of identifiers with optional
authornipkow
Sat, 22 Apr 1995 12:21:41 +0200
changeset 1067 00ed040f66e1
parent 1066 ab11d05780f4
child 1068 e0f2dffab506
I have modified the grammar for idts (sequences of identifiers with optional type annotations). idts are generally used as in abstractions, be it lambda-abstraction or quantifiers. It now has roughly the form idts = pttrn* pttrn = idt where pttrn is a new nonterminal (type) not used anywhere else. This means that the Pure syntax for idts is in fact unchanged. The point is that the new nontermianl pttrn allows later extensions of this syntax. (See, for example, HOL/Prod.thy). The name idts is not quite accurate any longer and may become downright confusing once pttrn has been extended. Something should be done about this, in particular wrt to the manual.
src/Pure/Syntax/mixfix.ML
--- a/src/Pure/Syntax/mixfix.ML	Wed Apr 19 19:15:29 1995 +0200
+++ b/src/Pure/Syntax/mixfix.ML	Sat Apr 22 12:21:41 1995 +0200
@@ -140,7 +140,7 @@
 val pure_types =
   map (fn t => (t, 0, NoSyn))
     (terminals @ [logic, "type", "types", "sort", "classes", args,
-      "idt", "idts", "aprop", "asms", any, sprop]);
+      "pttrn", "idt", "idts", "aprop", "asms", any, sprop]);
 
 val pure_syntax =
  [("_lambda",   "[idts, 'a] => logic",            Mixfix ("(3%_./ _)", [], 0)),
@@ -150,8 +150,9 @@
   ("",          "id => idt",                      Delimfix "_"),
   ("_idtyp",    "[id, type] => idt",              Mixfix ("_::_", [], 0)),
   ("",          "idt => idt",                     Delimfix "'(_')"),
-  ("",          "idt => idts",                    Delimfix "_"),
-  ("_idts",     "[idt, idts] => idts",            Mixfix ("_/ _", [1, 0], 0)),
+  ("",          "idt => pttrn",                   Delimfix "_"),
+  ("",          "pttrn => idts",                  Delimfix "_"),
+  ("_idts",     "[pttrn, idts] => idts",          Mixfix ("_/ _", [1, 0], 0)),
   ("",          "id => aprop",                    Delimfix "_"),
   ("",          "var => aprop",                   Delimfix "_"),
   ("_aprop",    "aprop => prop",                  Delimfix "PROP _"),