author | wenzelm |
Mon, 15 Jan 2018 14:31:57 +0100 | |
changeset 67438 | fdb7b995974d |
parent 63352 | 4eaf35781b23 |
child 67450 | b0ae74b86ef3 |
permissions | -rw-r--r-- |
36952
338c3f8229e4
renamed structure SpecParse to Parse_Spec, keeping the old name as alias for some time;
wenzelm
parents:
36950
diff
changeset
|
1 |
(* Title: Pure/Isar/parse_spec.ML |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
3 |
|
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
4 |
Parsers for complex specifications. |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
5 |
*) |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
6 |
|
36952
338c3f8229e4
renamed structure SpecParse to Parse_Spec, keeping the old name as alias for some time;
wenzelm
parents:
36950
diff
changeset
|
7 |
signature PARSE_SPEC = |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
8 |
sig |
29312 | 9 |
val thm_name: string -> Attrib.binding parser |
10 |
val opt_thm_name: string -> Attrib.binding parser |
|
58011
bc6bced136e5
tuned signature -- moved type src to Token, without aliases;
wenzelm
parents:
56945
diff
changeset
|
11 |
val name_facts: (Attrib.binding * (Facts.ref * Token.src list) list) list parser |
63064
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
12 |
val simple_spec: (Attrib.binding * string) parser |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
13 |
val simple_specs: (Attrib.binding * string list) parser |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
14 |
val if_assumes: string list parser |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
15 |
val multi_specs: Specification.multi_specs_cmd parser |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
16 |
val where_multi_specs: Specification.multi_specs_cmd parser |
63183 | 17 |
val specification: |
18 |
((binding * string option * mixfix) list * Specification.multi_specs_cmd) parser |
|
33287
0f99569d23e1
provide SpecParse.constdecl/constdef, e.g. for quotient_definition;
wenzelm
parents:
30726
diff
changeset
|
19 |
val constdecl: (binding * string option * mixfix) parser |
47067
4ef29b0c568f
optional 'includes' element for long theorem statements;
wenzelm
parents:
46922
diff
changeset
|
20 |
val includes: (xstring * Position.T) list parser |
29581 | 21 |
val locale_fixes: (binding * string option * mixfix) list parser |
29312 | 22 |
val locale_insts: (string option list * (Attrib.binding * string) list) parser |
46922
3717f3878714
source positions for locale and class expressions;
wenzelm
parents:
45592
diff
changeset
|
23 |
val class_expression: string list parser |
61606
6d5213bd9709
uniform mandatory qualifier for all locale expressions, including 'statespace' parent;
wenzelm
parents:
61466
diff
changeset
|
24 |
val locale_prefix: (string * bool) parser |
49754
acafcac41690
more explicit namespace prefix for 'statespace' -- duplicate facts;
wenzelm
parents:
47067
diff
changeset
|
25 |
val locale_keyword: string parser |
61606
6d5213bd9709
uniform mandatory qualifier for all locale expressions, including 'statespace' parent;
wenzelm
parents:
61466
diff
changeset
|
26 |
val locale_expression: Expression.expression parser |
29312 | 27 |
val context_element: Element.context parser |
61654
4a28eec739e9
support for structure statements in 'assume', 'presume';
wenzelm
parents:
61606
diff
changeset
|
28 |
val statement': (string * string list) list list parser |
4a28eec739e9
support for structure statements in 'assume', 'presume';
wenzelm
parents:
61606
diff
changeset
|
29 |
val if_statement': (string * string list) list list parser |
29312 | 30 |
val statement: (Attrib.binding * (string * string list) list) list parser |
60449 | 31 |
val if_statement: (Attrib.binding * (string * string list) list) list parser |
60555
51a6997b1384
support 'when' statement, which corresponds to 'presume';
wenzelm
parents:
60449
diff
changeset
|
32 |
val cond_statement: (bool * (Attrib.binding * (string * string list) list) list) parser |
60448 | 33 |
val obtains: Element.obtains parser |
63094
056ea294c256
toplevel theorem statements support 'if'/'for' eigen-context;
wenzelm
parents:
63064
diff
changeset
|
34 |
val long_statement: (Element.context list * Element.statement) parser |
056ea294c256
toplevel theorem statements support 'if'/'for' eigen-context;
wenzelm
parents:
63064
diff
changeset
|
35 |
val long_statement_keyword: string parser |
61260 | 36 |
val overloaded: bool parser |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
37 |
end; |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
38 |
|
36952
338c3f8229e4
renamed structure SpecParse to Parse_Spec, keeping the old name as alias for some time;
wenzelm
parents:
36950
diff
changeset
|
39 |
structure Parse_Spec: PARSE_SPEC = |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
40 |
struct |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
41 |
|
63064
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
42 |
(* simple specifications *) |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
43 |
|
58028
e4250d370657
tuned signature -- define some elementary operations earlier;
wenzelm
parents:
58011
diff
changeset
|
44 |
fun thm_name s = Parse.binding -- Parse.opt_attribs --| Parse.$$$ s; |
28083
103d9282a946
explicit type Name.binding for higher-specification elements;
wenzelm
parents:
27816
diff
changeset
|
45 |
|
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
46 |
fun opt_thm_name s = |
58028
e4250d370657
tuned signature -- define some elementary operations earlier;
wenzelm
parents:
58011
diff
changeset
|
47 |
Scan.optional |
e4250d370657
tuned signature -- define some elementary operations earlier;
wenzelm
parents:
58011
diff
changeset
|
48 |
((Parse.binding -- Parse.opt_attribs || Parse.attribs >> pair Binding.empty) --| Parse.$$$ s) |
63352 | 49 |
Binding.empty_atts; |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
50 |
|
63064
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
51 |
val simple_spec = opt_thm_name ":" -- Parse.prop; |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
52 |
val simple_specs = opt_thm_name ":" -- Scan.repeat1 Parse.prop; |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
53 |
|
62969 | 54 |
val name_facts = Parse.and_list1 (opt_thm_name "=" -- Parse.thms1); |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
55 |
|
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
56 |
|
63064
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
57 |
(* structured specifications *) |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
58 |
|
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
59 |
val if_assumes = |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
60 |
Scan.optional (Parse.$$$ "if" |-- Parse.!!! (Parse.and_list1 (Scan.repeat1 Parse.prop) >> flat)) |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
61 |
[]; |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
62 |
|
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
63 |
val multi_specs = |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
64 |
Parse.enum1 "|" |
63182 | 65 |
((opt_thm_name ":" -- Parse.prop -- if_assumes -- Parse.for_fixes >> Scan.triple1) --| |
63064
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
66 |
Scan.option (Scan.ahead (Parse.name || Parse.$$$ "[") -- Parse.!!! (Parse.$$$ "|"))); |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
67 |
|
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
68 |
val where_multi_specs = Parse.where_ |-- Parse.!!! multi_specs; |
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
69 |
|
63285 | 70 |
val specification = Parse.vars -- where_multi_specs; |
63183 | 71 |
|
63064
2f18172214c8
support 'assumes' in specifications, e.g. 'definition', 'inductive';
wenzelm
parents:
62969
diff
changeset
|
72 |
|
33287
0f99569d23e1
provide SpecParse.constdecl/constdef, e.g. for quotient_definition;
wenzelm
parents:
30726
diff
changeset
|
73 |
(* basic constant specifications *) |
0f99569d23e1
provide SpecParse.constdecl/constdef, e.g. for quotient_definition;
wenzelm
parents:
30726
diff
changeset
|
74 |
|
0f99569d23e1
provide SpecParse.constdecl/constdef, e.g. for quotient_definition;
wenzelm
parents:
30726
diff
changeset
|
75 |
val constdecl = |
36950 | 76 |
Parse.binding -- |
77 |
(Parse.where_ >> K (NONE, NoSyn) || |
|
78 |
Parse.$$$ "::" |-- Parse.!!! ((Parse.typ >> SOME) -- Parse.opt_mixfix' --| Parse.where_) || |
|
79 |
Scan.ahead (Parse.$$$ "(") |-- Parse.!!! (Parse.mixfix' --| Parse.where_ >> pair NONE)) |
|
61466 | 80 |
>> Scan.triple2; |
33287
0f99569d23e1
provide SpecParse.constdecl/constdef, e.g. for quotient_definition;
wenzelm
parents:
30726
diff
changeset
|
81 |
|
0f99569d23e1
provide SpecParse.constdecl/constdef, e.g. for quotient_definition;
wenzelm
parents:
30726
diff
changeset
|
82 |
|
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
83 |
(* locale and context elements *) |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
84 |
|
62969 | 85 |
val includes = Parse.$$$ "includes" |-- Parse.!!! (Scan.repeat1 (Parse.position Parse.name)); |
47067
4ef29b0c568f
optional 'includes' element for long theorem statements;
wenzelm
parents:
46922
diff
changeset
|
86 |
|
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
87 |
val locale_fixes = |
51654
8450b944e58a
just one syntax category "mixfix" -- check structure annotation semantically;
wenzelm
parents:
49754
diff
changeset
|
88 |
Parse.and_list1 (Parse.binding -- Scan.option (Parse.$$$ "::" |-- Parse.typ) -- Parse.mixfix |
61466 | 89 |
>> (single o Scan.triple1) || |
60448 | 90 |
Parse.params) >> flat; |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
91 |
|
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
92 |
val locale_insts = |
36950 | 93 |
Scan.optional |
94 |
(Parse.$$$ "[" |-- Parse.!!! (Scan.repeat1 (Parse.maybe Parse.term) --| Parse.$$$ "]")) [] -- |
|
95 |
Scan.optional (Parse.where_ |-- Parse.and_list1 (opt_thm_name ":" -- Parse.prop)) []; |
|
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
96 |
|
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
97 |
local |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
98 |
|
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
99 |
val loc_element = |
36950 | 100 |
Parse.$$$ "fixes" |-- Parse.!!! locale_fixes >> Element.Fixes || |
101 |
Parse.$$$ "constrains" |-- |
|
102 |
Parse.!!! (Parse.and_list1 (Parse.name -- (Parse.$$$ "::" |-- Parse.typ))) |
|
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
103 |
>> Element.Constrains || |
36950 | 104 |
Parse.$$$ "assumes" |-- Parse.!!! (Parse.and_list1 (opt_thm_name ":" -- Scan.repeat1 Parse.propp)) |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
105 |
>> Element.Assumes || |
36950 | 106 |
Parse.$$$ "defines" |-- Parse.!!! (Parse.and_list1 (opt_thm_name ":" -- Parse.propp)) |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
107 |
>> Element.Defines || |
62969 | 108 |
Parse.$$$ "notes" |-- Parse.!!! (Parse.and_list1 (opt_thm_name "=" -- Parse.thms1)) |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
109 |
>> (curry Element.Notes ""); |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
110 |
|
24869 | 111 |
fun plus1_unless test scan = |
36950 | 112 |
scan ::: Scan.repeat (Parse.$$$ "+" |-- Scan.unless test (Parse.!!! scan)); |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
113 |
|
36950 | 114 |
val instance = Parse.where_ |-- |
115 |
Parse.and_list1 (Parse.name -- (Parse.$$$ "=" |-- Parse.term)) >> Expression.Named || |
|
116 |
Scan.repeat1 (Parse.maybe Parse.term) >> Expression.Positional; |
|
29033
721529248e31
Enable keyword 'structure' in for clause of locale expression.
ballarin
parents:
28965
diff
changeset
|
117 |
|
24869 | 118 |
in |
119 |
||
61606
6d5213bd9709
uniform mandatory qualifier for all locale expressions, including 'statespace' parent;
wenzelm
parents:
61466
diff
changeset
|
120 |
val locale_prefix = |
49754
acafcac41690
more explicit namespace prefix for 'statespace' -- duplicate facts;
wenzelm
parents:
47067
diff
changeset
|
121 |
Scan.optional |
61606
6d5213bd9709
uniform mandatory qualifier for all locale expressions, including 'statespace' parent;
wenzelm
parents:
61466
diff
changeset
|
122 |
(Parse.name -- (Scan.option (Parse.$$$ "?") >> is_none) --| Parse.$$$ ":") |
49754
acafcac41690
more explicit namespace prefix for 'statespace' -- duplicate facts;
wenzelm
parents:
47067
diff
changeset
|
123 |
("", false); |
acafcac41690
more explicit namespace prefix for 'statespace' -- duplicate facts;
wenzelm
parents:
47067
diff
changeset
|
124 |
|
36950 | 125 |
val locale_keyword = |
126 |
Parse.$$$ "fixes" || Parse.$$$ "constrains" || Parse.$$$ "assumes" || |
|
127 |
Parse.$$$ "defines" || Parse.$$$ "notes"; |
|
28722 | 128 |
|
46922
3717f3878714
source positions for locale and class expressions;
wenzelm
parents:
45592
diff
changeset
|
129 |
val class_expression = plus1_unless locale_keyword Parse.class; |
24869 | 130 |
|
61606
6d5213bd9709
uniform mandatory qualifier for all locale expressions, including 'statespace' parent;
wenzelm
parents:
61466
diff
changeset
|
131 |
val locale_expression = |
29033
721529248e31
Enable keyword 'structure' in for clause of locale expression.
ballarin
parents:
28965
diff
changeset
|
132 |
let |
62969 | 133 |
val expr2 = Parse.position Parse.name; |
61606
6d5213bd9709
uniform mandatory qualifier for all locale expressions, including 'statespace' parent;
wenzelm
parents:
61466
diff
changeset
|
134 |
val expr1 = |
6d5213bd9709
uniform mandatory qualifier for all locale expressions, including 'statespace' parent;
wenzelm
parents:
61466
diff
changeset
|
135 |
locale_prefix -- expr2 -- |
30720 | 136 |
Scan.optional instance (Expression.Named []) >> (fn ((p, l), i) => (l, (p, i))); |
137 |
val expr0 = plus1_unless locale_keyword expr1; |
|
36950 | 138 |
in expr0 -- Scan.optional (Parse.$$$ "for" |-- Parse.!!! locale_fixes) [] end; |
29033
721529248e31
Enable keyword 'structure' in for clause of locale expression.
ballarin
parents:
28965
diff
changeset
|
139 |
|
44357 | 140 |
val context_element = Parse.group (fn () => "context element") loc_element; |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
141 |
|
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
142 |
end; |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
143 |
|
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
144 |
|
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
145 |
(* statements *) |
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
146 |
|
61654
4a28eec739e9
support for structure statements in 'assume', 'presume';
wenzelm
parents:
61606
diff
changeset
|
147 |
val statement' = Parse.and_list1 (Scan.repeat1 Parse.propp); |
4a28eec739e9
support for structure statements in 'assume', 'presume';
wenzelm
parents:
61606
diff
changeset
|
148 |
val if_statement' = Scan.optional (Parse.$$$ "if" |-- Parse.!!! statement') []; |
4a28eec739e9
support for structure statements in 'assume', 'presume';
wenzelm
parents:
61606
diff
changeset
|
149 |
|
36950 | 150 |
val statement = Parse.and_list1 (opt_thm_name ":" -- Scan.repeat1 Parse.propp); |
60449 | 151 |
val if_statement = Scan.optional (Parse.$$$ "if" |-- Parse.!!! statement) []; |
60414 | 152 |
|
60555
51a6997b1384
support 'when' statement, which corresponds to 'presume';
wenzelm
parents:
60449
diff
changeset
|
153 |
val cond_statement = |
51a6997b1384
support 'when' statement, which corresponds to 'presume';
wenzelm
parents:
60449
diff
changeset
|
154 |
Parse.$$$ "if" |-- Parse.!!! statement >> pair true || |
51a6997b1384
support 'when' statement, which corresponds to 'presume';
wenzelm
parents:
60449
diff
changeset
|
155 |
Parse.$$$ "when" |-- Parse.!!! statement >> pair false || |
51a6997b1384
support 'when' statement, which corresponds to 'presume';
wenzelm
parents:
60449
diff
changeset
|
156 |
Scan.succeed (true, []); |
51a6997b1384
support 'when' statement, which corresponds to 'presume';
wenzelm
parents:
60449
diff
changeset
|
157 |
|
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
158 |
val obtain_case = |
59784 | 159 |
Parse.parbinding -- |
63285 | 160 |
(Scan.optional (Parse.and_list1 Parse.vars --| Parse.where_ >> flat) [] -- |
59784 | 161 |
(Parse.and_list1 (Scan.repeat1 Parse.prop) >> flat)); |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
162 |
|
60448 | 163 |
val obtains = Parse.enum1 "|" obtain_case; |
164 |
||
63094
056ea294c256
toplevel theorem statements support 'if'/'for' eigen-context;
wenzelm
parents:
63064
diff
changeset
|
165 |
val long_statement = |
28722 | 166 |
Scan.repeat context_element -- |
60448 | 167 |
(Parse.$$$ "obtains" |-- Parse.!!! obtains >> Element.Obtains || |
36950 | 168 |
Parse.$$$ "shows" |-- Parse.!!! statement >> Element.Shows); |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
169 |
|
63094
056ea294c256
toplevel theorem statements support 'if'/'for' eigen-context;
wenzelm
parents:
63064
diff
changeset
|
170 |
val long_statement_keyword = |
056ea294c256
toplevel theorem statements support 'if'/'for' eigen-context;
wenzelm
parents:
63064
diff
changeset
|
171 |
locale_keyword || Parse.$$$ "obtains" || Parse.$$$ "shows"; |
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
172 |
|
61260 | 173 |
|
174 |
(* options *) |
|
175 |
||
176 |
val overloaded = |
|
177 |
Scan.optional (Parse.$$$ "(" -- Parse.$$$ "overloaded" -- Parse.$$$ ")" >> K true) false; |
|
178 |
||
22104
e8a1c88be824
Parsers for complex specifications (material from outer_parse.ML);
wenzelm
parents:
diff
changeset
|
179 |
end; |