equal
deleted
inserted
replaced
721 |
721 |
722 section {* Syntax and translations \label{sec:syn-trans} *} |
722 section {* Syntax and translations \label{sec:syn-trans} *} |
723 |
723 |
724 text {* |
724 text {* |
725 \begin{matharray}{rcl} |
725 \begin{matharray}{rcl} |
726 @{command_def "nonterminals"} & : & @{text "theory \<rightarrow> theory"} \\ |
726 @{command_def "nonterminal"} & : & @{text "theory \<rightarrow> theory"} \\ |
727 @{command_def "syntax"} & : & @{text "theory \<rightarrow> theory"} \\ |
727 @{command_def "syntax"} & : & @{text "theory \<rightarrow> theory"} \\ |
728 @{command_def "no_syntax"} & : & @{text "theory \<rightarrow> theory"} \\ |
728 @{command_def "no_syntax"} & : & @{text "theory \<rightarrow> theory"} \\ |
729 @{command_def "translations"} & : & @{text "theory \<rightarrow> theory"} \\ |
729 @{command_def "translations"} & : & @{text "theory \<rightarrow> theory"} \\ |
730 @{command_def "no_translations"} & : & @{text "theory \<rightarrow> theory"} \\ |
730 @{command_def "no_translations"} & : & @{text "theory \<rightarrow> theory"} \\ |
731 \end{matharray} |
731 \end{matharray} |
732 |
732 |
733 \begin{rail} |
733 \begin{rail} |
734 'nonterminals' (name +) |
734 'nonterminal' (name + 'and') |
735 ; |
735 ; |
736 ('syntax' | 'no_syntax') mode? (constdecl +) |
736 ('syntax' | 'no_syntax') mode? (constdecl +) |
737 ; |
737 ; |
738 ('translations' | 'no_translations') (transpat ('==' | '=>' | '<=' | rightleftharpoons | rightharpoonup | leftharpoondown) transpat +) |
738 ('translations' | 'no_translations') (transpat ('==' | '=>' | '<=' | rightleftharpoons | rightharpoonup | leftharpoondown) transpat +) |
739 ; |
739 ; |
744 ; |
744 ; |
745 \end{rail} |
745 \end{rail} |
746 |
746 |
747 \begin{description} |
747 \begin{description} |
748 |
748 |
749 \item @{command "nonterminals"}~@{text c} declares a type |
749 \item @{command "nonterminal"}~@{text c} declares a type |
750 constructor @{text c} (without arguments) to act as purely syntactic |
750 constructor @{text c} (without arguments) to act as purely syntactic |
751 type: a nonterminal symbol of the inner syntax. |
751 type: a nonterminal symbol of the inner syntax. |
752 |
752 |
753 \item @{command "syntax"}~@{text "(mode) decls"} is similar to |
753 \item @{command "syntax"}~@{text "(mode) decls"} is similar to |
754 @{command "consts"}~@{text decls}, except that the actual logical |
754 @{command "consts"}~@{text decls}, except that the actual logical |