275 |
275 |
276 \<^item> \<^verbatim>\<open>internal\<close> dummy print mode that is never active; |
276 \<^item> \<^verbatim>\<open>internal\<close> dummy print mode that is never active; |
277 used internally in Isabelle/Pure. |
277 used internally in Isabelle/Pure. |
278 |
278 |
279 \<^item> \<^verbatim>\<open>xsymbols\<close>: enable proper mathematical symbols |
279 \<^item> \<^verbatim>\<open>xsymbols\<close>: enable proper mathematical symbols |
280 instead of ASCII art.\footnote{This traditional mode name stems from |
280 instead of ASCII art.\<^footnote>\<open>This traditional mode name stems from |
281 the ``X-Symbol'' package for classic Proof~General with XEmacs.} |
281 the ``X-Symbol'' package for classic Proof~General with XEmacs.\<close> |
282 |
282 |
283 \<^item> \<^verbatim>\<open>latex\<close>: additional mode that is active in {\LaTeX} |
283 \<^item> \<^verbatim>\<open>latex\<close>: additional mode that is active in {\LaTeX} |
284 document preparation of Isabelle theory sources; allows to provide |
284 document preparation of Isabelle theory sources; allows to provide |
285 alternative output notation. |
285 alternative output notation. |
286 \<close> |
286 \<close> |
336 |
336 |
337 Altogether this determines a production for a context-free priority |
337 Altogether this determines a production for a context-free priority |
338 grammar, where for each argument \<open>i\<close> the syntactic category |
338 grammar, where for each argument \<open>i\<close> the syntactic category |
339 is determined by \<open>\<tau>\<^sub>i\<close> (with priority \<open>p\<^sub>i\<close>), and the |
339 is determined by \<open>\<tau>\<^sub>i\<close> (with priority \<open>p\<^sub>i\<close>), and the |
340 result category is determined from \<open>\<tau>\<close> (with priority \<open>p\<close>). Priority specifications are optional, with default 0 for |
340 result category is determined from \<open>\<tau>\<close> (with priority \<open>p\<close>). Priority specifications are optional, with default 0 for |
341 arguments and 1000 for the result.\footnote{Omitting priorities is |
341 arguments and 1000 for the result.\<^footnote>\<open>Omitting priorities is |
342 prone to syntactic ambiguities unless the delimiter tokens determine |
342 prone to syntactic ambiguities unless the delimiter tokens determine |
343 fully bracketed notation, as in \<open>if _ then _ else _ fi\<close>.} |
343 fully bracketed notation, as in \<open>if _ then _ else _ fi\<close>.\<close> |
344 |
344 |
345 Since \<open>\<tau>\<close> may be again a function type, the constant |
345 Since \<open>\<tau>\<close> may be again a function type, the constant |
346 type scheme may have more argument positions than the mixfix |
346 type scheme may have more argument positions than the mixfix |
347 pattern. Printing a nested application \<open>c t\<^sub>1 \<dots> t\<^sub>m\<close> for |
347 pattern. Printing a nested application \<open>c t\<^sub>1 \<dots> t\<^sub>m\<close> for |
348 \<open>m > n\<close> works by attaching concrete notation only to the |
348 \<open>m > n\<close> works by attaching concrete notation only to the |
1211 |
1211 |
1212 AST rewrite rules \<open>(lhs, rhs)\<close> need to obey the following |
1212 AST rewrite rules \<open>(lhs, rhs)\<close> need to obey the following |
1213 side-conditions: |
1213 side-conditions: |
1214 |
1214 |
1215 \<^item> Rules must be left linear: \<open>lhs\<close> must not contain |
1215 \<^item> Rules must be left linear: \<open>lhs\<close> must not contain |
1216 repeated variables.\footnote{The deeper reason for this is that AST |
1216 repeated variables.\<^footnote>\<open>The deeper reason for this is that AST |
1217 equality is not well-defined: different occurrences of the ``same'' |
1217 equality is not well-defined: different occurrences of the ``same'' |
1218 AST could be decorated differently by accidental type-constraints or |
1218 AST could be decorated differently by accidental type-constraints or |
1219 source position information, for example.} |
1219 source position information, for example.\<close> |
1220 |
1220 |
1221 \<^item> Every variable in \<open>rhs\<close> must also occur in \<open>lhs\<close>. |
1221 \<^item> Every variable in \<open>rhs\<close> must also occur in \<open>lhs\<close>. |
1222 |
1222 |
1223 \<^descr> @{command "no_translations"}~\<open>rules\<close> removes syntactic |
1223 \<^descr> @{command "no_translations"}~\<open>rules\<close> removes syntactic |
1224 translation rules, which are interpreted in the same manner as for |
1224 translation rules, which are interpreted in the same manner as for |