4 \newlinechar=-1 %mathsing.sty sets \newlinechar=`\|, which would cause mayhem
6 \chapter{Syntax of Isabelle Theories}\label{app:TheorySyntax}
8 \item {\tt Typewriter font} denotes terminal symbols.
9 \item $id$, $tid$, $nat$, $string$ and $text$ are the lexical classes of
10 identifiers, type identifiers, natural numbers, \ML\ strings (with their
11 quotation marks) and arbitrary \ML\ text. The first three are fully defined
12 in the {\it Defining Logics} chapter of {\it Isabelle's Object Logics}.
17 theoryDef : id '=' (name + '+') ('+' extension | ());
21 extension : classes default types arities consts trans rules 'end' ml
25 | 'classes' ( ( id ( ()
36 | '\{' (id * ',') '\}'
40 | 'types' ( ( type ( () | '(' infix ')' ) ) + )
43 type : ( () | tid | '(' ( tid + ',' ) ')') name ( () | '=' string );
45 infix : ( 'infixr' | 'infixl' ) nat;
49 | 'arities' ((( name + ',' ) '::' arity ) + )
53 | '(' (sort + ',') ')'
59 | 'consts' ( ( constDecl ( () | ( '(' mixfix ')' ) ) ) + )
62 constDecl : ( name + ',') '::' string ;
65 mixfix : string ( () | ( () | ('[' (nat + ',') ']')) nat )
67 | 'binder' string nat ;
70 | 'translations' ( pat ( '==' | '=>' | '<=' ) pat + )
73 pat : ( () | ( '(' id ')' ) ) string;
76 | 'rules' (( id string ) + )