doc-src/IsarRef/Thy/Inner_Syntax.thy
changeset 30240 5b25fee0362c
parent 29157 461f34ed79ec
child 30397 b6212ae21656
equal deleted inserted replaced
30239:179ff9cb160b 30240:5b25fee0362c
     1 (* $Id$ *)
       
     2 
       
     3 theory Inner_Syntax
     1 theory Inner_Syntax
     4 imports Main
     2 imports Main
     5 begin
     3 begin
     6 
     4 
     7 chapter {* Inner syntax --- the term language \label{ch:inner-syntax} *}
     5 chapter {* Inner syntax --- the term language \label{ch:inner-syntax} *}
   368     @{command_def "notation"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   366     @{command_def "notation"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   369     @{command_def "no_notation"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   367     @{command_def "no_notation"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   370   \end{matharray}
   368   \end{matharray}
   371 
   369 
   372   \begin{rail}
   370   \begin{rail}
   373     ('notation' | 'no\_notation') target? mode? (nameref structmixfix + 'and')
   371     ('notation' | 'no\_notation') target? mode? \\ (nameref structmixfix + 'and')
   374     ;
   372     ;
   375   \end{rail}
   373   \end{rail}
   376 
   374 
   377   \begin{description}
   375   \begin{description}
   378 
   376 
   523 
   521 
   524   @{syntax_def (inner) type} & = & @{verbatim "("} @{text type} @{verbatim ")"} \\
   522   @{syntax_def (inner) type} & = & @{verbatim "("} @{text type} @{verbatim ")"} \\
   525     & @{text "|"} & @{text "tid  |  tvar  |  "}@{verbatim "_"} \\
   523     & @{text "|"} & @{text "tid  |  tvar  |  "}@{verbatim "_"} \\
   526     & @{text "|"} & @{text "tid"} @{verbatim "::"} @{text "sort  |  tvar  "}@{verbatim "::"} @{text "sort  |  "}@{verbatim "_"} @{verbatim "::"} @{text "sort"} \\
   524     & @{text "|"} & @{text "tid"} @{verbatim "::"} @{text "sort  |  tvar  "}@{verbatim "::"} @{text "sort  |  "}@{verbatim "_"} @{verbatim "::"} @{text "sort"} \\
   527     & @{text "|"} & @{text "id  |  type\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) id  |  "}@{verbatim "("} @{text type} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text type} @{verbatim ")"} @{text id} \\
   525     & @{text "|"} & @{text "id  |  type\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) id  |  "}@{verbatim "("} @{text type} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text type} @{verbatim ")"} @{text id} \\
   528     & @{text "|"} & @{text "longid  |  type\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) longid  |  "}@{verbatim "("} @{text type} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text type} @{verbatim ")"} @{text longid} \\
   526     & @{text "|"} & @{text "longid  |  type\<^sup>(\<^sup>1\<^sup>0\<^sup>0\<^sup>0\<^sup>) longid"} \\
       
   527     & @{text "|"} & @{verbatim "("} @{text type} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text type} @{verbatim ")"} @{text longid} \\
   529     & @{text "|"} & @{text "type\<^sup>(\<^sup>1\<^sup>)"} @{verbatim "=>"} @{text type} & @{text "(0)"} \\
   528     & @{text "|"} & @{text "type\<^sup>(\<^sup>1\<^sup>)"} @{verbatim "=>"} @{text type} & @{text "(0)"} \\
   530     & @{text "|"} & @{text "type\<^sup>(\<^sup>1\<^sup>)"} @{text "\<Rightarrow>"} @{text type} & @{text "(0)"} \\
   529     & @{text "|"} & @{text "type\<^sup>(\<^sup>1\<^sup>)"} @{text "\<Rightarrow>"} @{text type} & @{text "(0)"} \\
   531     & @{text "|"} & @{verbatim "["} @{text type} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text type} @{verbatim "]"} @{verbatim "=>"} @{text type} & @{text "(0)"} \\
   530     & @{text "|"} & @{verbatim "["} @{text type} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text type} @{verbatim "]"} @{verbatim "=>"} @{text type} & @{text "(0)"} \\
   532     & @{text "|"} & @{verbatim "["} @{text type} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text type} @{verbatim "]"} @{text "\<Rightarrow>"} @{text type} & @{text "(0)"} \\\\
   531     & @{text "|"} & @{verbatim "["} @{text type} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text type} @{verbatim "]"} @{text "\<Rightarrow>"} @{text type} & @{text "(0)"} \\\\
   533 
   532 
   534   @{syntax_def (inner) sort} & = & @{text "id  |  longid  |  "}@{verbatim "{}"}@{text "  |  "}@{verbatim "{"} @{text "(id | longid)"} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text "(id | longid)"} @{verbatim "}"} \\
   533   @{syntax_def (inner) sort} & = & @{text "id  |  longid  |  "}@{verbatim "{}"} \\
       
   534     & @{text "|"} & @{verbatim "{"} @{text "(id | longid)"} @{verbatim ","} @{text "\<dots>"} @{verbatim ","} @{text "(id | longid)"} @{verbatim "}"} \\
   535   \end{supertabular}
   535   \end{supertabular}
   536   \end{center}
   536   \end{center}
   537 
   537 
   538   \medskip Here literal terminals are printed @{verbatim "verbatim"};
   538   \medskip Here literal terminals are printed @{verbatim "verbatim"};
   539   see also \secref{sec:inner-lex} for further token categories of the
   539   see also \secref{sec:inner-lex} for further token categories of the