# HG changeset patch # User wenzelm # Date 1730029647 -3600 # Node ID 59b5696b00a3d7537a6b11bbce8610feaff9677a # Parent 5ed639c16ce72e2cadecd80ca65562b91c5c6e10 update documentation; tuned typesetting; diff -r 5ed639c16ce7 -r 59b5696b00a3 src/Doc/Isar_Ref/Inner_Syntax.thy --- a/src/Doc/Isar_Ref/Inner_Syntax.thy Sun Oct 27 12:32:40 2024 +0100 +++ b/src/Doc/Isar_Ref/Inner_Syntax.thy Sun Oct 27 12:47:27 2024 +0100 @@ -334,8 +334,7 @@ \<^descr> \d\ is a delimiter, namely a non-empty sequence delimiter items of the following form: \<^enum> a control symbol followed by a cartouche - \<^enum> a single symbol, excluding the following special characters: - \<^medskip> + \<^enum> a single symbol, excluding the following special characters: \\[\medskipamount] \begin{tabular}{ll} \<^verbatim>\'\ & single quote \\ \<^verbatim>\_\ & underscore \\ @@ -345,7 +344,6 @@ \<^verbatim>\/\ & slash \\ \\ \\ & cartouche delimiters \\ \end{tabular} - \<^medskip> \<^descr> \<^verbatim>\'\ escapes the special meaning of these meta-characters, producing a literal version of the following character, unless that is a blank. @@ -391,7 +389,7 @@ atom: @{syntax short_ident} | @{syntax int} | @{syntax float} | @{syntax cartouche} \ - Each @{syntax entry} is a name-value pair, but the latter is optional. If + Each @{syntax entry} is a name--value pair, but the latter is optional. If the value is omitted, the default depends on its type (Boolean: \<^verbatim>\true\, number: \<^verbatim>\1\, otherwise the empty string). The following standard block properties are supported: @@ -467,13 +465,13 @@ \begin{tabular}{lll} \<^verbatim>\(\@{keyword_def "infix"}~\<^verbatim>\"\\sy\\<^verbatim>\"\ \p\\<^verbatim>\)\ - & \\\ & + & \\\ & \<^verbatim>\("(_\~\sy\\<^verbatim>\/ _)" [\\p + 1\\<^verbatim>\,\~\p + 1\\<^verbatim>\]\~\p\\<^verbatim>\)\ \\ \<^verbatim>\(\@{keyword_def "infixl"}~\<^verbatim>\"\\sy\\<^verbatim>\"\ \p\\<^verbatim>\)\ - & \\\ & + & \\\ & \<^verbatim>\("(_\~\sy\\<^verbatim>\/ _)" [\\p\\<^verbatim>\,\~\p + 1\\<^verbatim>\]\~\p\\<^verbatim>\)\ \\ \<^verbatim>\(\@{keyword_def "infixr"}~\<^verbatim>\"\\sy\\<^verbatim>\"\~\p\\<^verbatim>\)\ - & \\\ & + & \\\ & \<^verbatim>\("(_\~\sy\\<^verbatim>\/ _)" [\\p + 1\\<^verbatim>\,\~\p\\<^verbatim>\]\~\p\\<^verbatim>\)\ \\ \end{tabular} @@ -1300,6 +1298,12 @@ them actual constants even before name space resolution (see also \secref{sec:ast}). + \<^item> Objects of the form \<^verbatim>\Ast.Appl [Constant "_constrain",\~\u\\<^verbatim>\,\~\T\\<^verbatim>\]\, + for \u\ as \<^ML>\Ast.Variable\~\x\ or \<^ML>\Ast.Constant\~\x\, are + matched by \<^ML>\Ast.Constant\~\x\ if the AST \T\ encodes a source + position (from parsing) or if types are considered optional (for + printing). + \<^item> Object \u\ is matched by pattern \<^ML>\Ast.Variable\~\x\, binding \x\ to \u\. @@ -1504,10 +1508,10 @@ \end{tabular} \end{center} - Note that type and sort constraints may occur in further places --- - translations need to be ready to cope with them. The built-in syntax - transformation from parse trees to ASTs insert additional constraints that - represent source positions. + Note that type and sort constraints may occur in many other places --- + translations need to cope with them. The built-in syntax transformation from + parse trees to ASTs insert additional constraints that represent source + positions. \