doc-src/IsarRef/Thy/Inner_Syntax.thy
changeset 40255 9ffbc25e1606
parent 39279 878d86983dc1
child 40879 ca132ef44944
equal deleted inserted replaced
40254:6d1ebaa7a4ba 40255:9ffbc25e1606
    29     ;
    29     ;
    30     'prop' modes? prop
    30     'prop' modes? prop
    31     ;
    31     ;
    32     'thm' modes? thmrefs
    32     'thm' modes? thmrefs
    33     ;
    33     ;
    34     ( 'prf' | 'full\_prf' ) modes? thmrefs?
    34     ( 'prf' | 'full_prf' ) modes? thmrefs?
    35     ;
    35     ;
    36     'pr' modes? nat?
    36     'pr' modes? nat?
    37     ;
    37     ;
    38 
    38 
    39     modes: '(' (name + ) ')'
    39     modes: '(' (name + ) ')'
   362     @{command_def "no_notation"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   362     @{command_def "no_notation"} & : & @{text "local_theory \<rightarrow> local_theory"} \\
   363     @{command_def "write"} & : & @{text "proof(state) \<rightarrow> proof(state)"} \\
   363     @{command_def "write"} & : & @{text "proof(state) \<rightarrow> proof(state)"} \\
   364   \end{matharray}
   364   \end{matharray}
   365 
   365 
   366   \begin{rail}
   366   \begin{rail}
   367     ('type\_notation' | 'no\_type\_notation') target? mode? \\ (nameref mixfix + 'and')
   367     ('type_notation' | 'no_type_notation') target? mode? \\ (nameref mixfix + 'and')
   368     ;
   368     ;
   369     ('notation' | 'no\_notation') target? mode? \\ (nameref structmixfix + 'and')
   369     ('notation' | 'no_notation') target? mode? \\ (nameref structmixfix + 'and')
   370     ;
   370     ;
   371     'write' mode? (nameref structmixfix + 'and')
   371     'write' mode? (nameref structmixfix + 'and')
   372     ;
   372     ;
   373   \end{rail}
   373   \end{rail}
   374 
   374 
   728   \end{matharray}
   728   \end{matharray}
   729 
   729 
   730   \begin{rail}
   730   \begin{rail}
   731     'nonterminals' (name +)
   731     'nonterminals' (name +)
   732     ;
   732     ;
   733     ('syntax' | 'no\_syntax') mode? (constdecl +)
   733     ('syntax' | 'no_syntax') mode? (constdecl +)
   734     ;
   734     ;
   735     ('translations' | 'no\_translations') (transpat ('==' | '=>' | '<=' | rightleftharpoons | rightharpoonup | leftharpoondown) transpat +)
   735     ('translations' | 'no_translations') (transpat ('==' | '=>' | '<=' | rightleftharpoons | rightharpoonup | leftharpoondown) transpat +)
   736     ;
   736     ;
   737 
   737 
   738     mode: ('(' ( name | 'output' | name 'output' ) ')')
   738     mode: ('(' ( name | 'output' | name 'output' ) ')')
   739     ;
   739     ;
   740     transpat: ('(' nameref ')')? string
   740     transpat: ('(' nameref ')')? string
   784     @{command_def "typed_print_translation"} & : & @{text "theory \<rightarrow> theory"} \\
   784     @{command_def "typed_print_translation"} & : & @{text "theory \<rightarrow> theory"} \\
   785     @{command_def "print_ast_translation"} & : & @{text "theory \<rightarrow> theory"} \\
   785     @{command_def "print_ast_translation"} & : & @{text "theory \<rightarrow> theory"} \\
   786   \end{matharray}
   786   \end{matharray}
   787 
   787 
   788   \begin{rail}
   788   \begin{rail}
   789   ( 'parse\_ast\_translation' | 'parse\_translation' | 'print\_translation' |
   789   ( 'parse_ast_translation' | 'parse_translation' | 'print_translation' |
   790     'typed\_print\_translation' | 'print\_ast\_translation' ) ('(advanced)')? text
   790     'typed_print_translation' | 'print_ast_translation' ) ('(advanced)')? text
   791   ;
   791   ;
   792   \end{rail}
   792   \end{rail}
   793 
   793 
   794   Syntax translation functions written in ML admit almost arbitrary
   794   Syntax translation functions written in ML admit almost arbitrary
   795   manipulations of Isabelle's inner syntax.  Any of the above commands
   795   manipulations of Isabelle's inner syntax.  Any of the above commands