doc-src/Ref/theory-syntax.tex
changeset 1080 13c35eb5169b
parent 325 49baeba86546
child 1082 1b30e27aca82
--- a/doc-src/Ref/theory-syntax.tex	Mon May 01 11:17:41 1995 +0200
+++ b/doc-src/Ref/theory-syntax.tex	Tue May 02 19:59:06 1995 +0200
@@ -25,26 +25,32 @@
 
 name: id | string;
 
-extension : classes default types arities consts trans rules \\ 'end' ml
-          ;
+extension : (section +) 'end' ml;
 
-classes : ()
-        | 'classes' ( ( id (  ()
+section : classes
+        | default
+        | types
+        | arities
+        | consts
+        | trans
+        | defs
+        | rules
+        ;
+
+classes : 'classes' ( ( id (  ()
                             | '<' (id + ',')
                            ) 
                        ) + )
         ;
 
-default : ()
-        | 'default' sort 
+default : 'default' sort 
         ;
 
 sort :  id
      | '\{' (id * ',') '\}'
      ;
 
-types :  ()
-      | 'types' ( ( typeDecl ( () | '(' infix ')' ) ) + )
+types : 'types' ( ( typeDecl ( () | '(' infix ')' ) ) + )
       ;
 
 typeDecl : ( () | tid | '(' ( tid + ',' ) ')') name ( () | '='  string );
@@ -52,8 +58,7 @@
 infix : ( 'infixr' | 'infixl' ) nat;
 
 
-arities :  ()
-        | 'arities' ((( name + ',' ) '::' arity ) + )
+arities : 'arities' ((( name + ',' ) '::' arity ) + )
         ;
 
 arity   : ( () 
@@ -62,8 +67,7 @@
         ;
 
 
-consts :  ()
-       | 'consts' ( ( constDecl ( () | ( '(' mixfix ')' ) ) ) + )
+consts : 'consts' ( ( constDecl ( () | ( '(' mixfix ')' ) ) ) + )
        ;
 
 constDecl : ( name + ',') '::' string ;
@@ -73,16 +77,17 @@
        | infix
        | 'binder' string nat ;
 
-trans : ()
-      | 'translations' ( pat ( '==' | '=>' | '<=' ) pat + )
+trans : 'translations' ( pat ( '==' | '=>' | '<=' ) pat + )
       ;
 
 pat : ( () | ( '(' id ')' ) ) string;
 
-rules :  ()
-      | 'rules' (( id string ) + )
+rules : 'rules' (( id string ) + )
       ;
 
+defs : 'defs' (( id string ) + )
+     ;
+
 ml :  ()
    | 'ML' text
    ;