| author | haftmann |
| Sat, 02 Jul 2011 10:37:35 +0200 | |
| changeset 43639 | 9cba66fb109a |
| parent 43485 | 33a24212a72d |
| child 43777 | 22c87ff1b8a9 |
| permissions | -rw-r--r-- |
| 6118 | 1 |
(* Title: Pure/General/symbol.ML |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
2 |
Author: Markus Wenzel, TU Muenchen |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
3 |
|
| 21897 | 4 |
Generalized characters with infinitely many named symbols. |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
5 |
*) |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
6 |
|
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
7 |
signature SYMBOL = |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
8 |
sig |
| 40509 | 9 |
type symbol = string |
| 26524 | 10 |
val SOH: symbol |
11 |
val STX: symbol |
|
|
26538
d65504ffb47d
replaced ETX/EOT by ENQ/ACK, which are less likely to be interpreted by tty etc.;
wenzelm
parents:
26524
diff
changeset
|
12 |
val ENQ: symbol |
|
d65504ffb47d
replaced ETX/EOT by ENQ/ACK, which are less likely to be interpreted by tty etc.;
wenzelm
parents:
26524
diff
changeset
|
13 |
val ACK: symbol |
| 26524 | 14 |
val DEL: symbol |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
15 |
val space: symbol |
| 23618 | 16 |
val spaces: int -> string |
| 14678 | 17 |
val is_char: symbol -> bool |
|
37533
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
18 |
val is_utf8: symbol -> bool |
| 14678 | 19 |
val is_symbolic: symbol -> bool |
20 |
val is_printable: symbol -> bool |
|
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
21 |
val eof: symbol |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
22 |
val is_eof: symbol -> bool |
| 27766 | 23 |
val not_eof: symbol -> bool |
| 27732 | 24 |
val stopper: symbol Scan.stopper |
| 14678 | 25 |
val sync: symbol |
26 |
val is_sync: symbol -> bool |
|
|
23784
75e6b9dd5336
Symbol.not_eof/sync is superceded by Symbol.is_regular (rules out further control symbols);
wenzelm
parents:
23728
diff
changeset
|
27 |
val is_regular: symbol -> bool |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
28 |
val is_malformed: symbol -> bool |
|
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
29 |
val malformed_msg: symbol -> string |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
30 |
val is_ascii: symbol -> bool |
| 14678 | 31 |
val is_ascii_letter: symbol -> bool |
32 |
val is_ascii_digit: symbol -> bool |
|
|
24580
916259859344
replaced Symbol.is_hex_letter to Symbol.is_ascii_hex;
wenzelm
parents:
23784
diff
changeset
|
33 |
val is_ascii_hex: symbol -> bool |
| 14678 | 34 |
val is_ascii_quasi: symbol -> bool |
35 |
val is_ascii_blank: symbol -> bool |
|
|
34095
c2f176a38448
robust representation of low ASCII control characters within XML/YXML text;
wenzelm
parents:
33955
diff
changeset
|
36 |
val is_ascii_control: symbol -> bool |
| 20200 | 37 |
val is_ascii_lower: symbol -> bool |
38 |
val is_ascii_upper: symbol -> bool |
|
39 |
val to_ascii_lower: symbol -> symbol |
|
40 |
val to_ascii_upper: symbol -> symbol |
|
| 14834 | 41 |
val is_raw: symbol -> bool |
42 |
val decode_raw: symbol -> string |
|
|
14977
77d88064991a
added escape, export encode_raw, default mode now trivial, tuned;
wenzelm
parents:
14961
diff
changeset
|
43 |
val encode_raw: string -> string |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
44 |
datatype sym = |
|
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
45 |
Char of string | UTF8 of string | Sym of string | Ctrl of string | Raw of string | |
| 43485 | 46 |
Malformed of string | EOF |
| 14873 | 47 |
val decode: symbol -> sym |
| 14678 | 48 |
datatype kind = Letter | Digit | Quasi | Blank | Other |
49 |
val kind: symbol -> kind |
|
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
50 |
val is_letter: symbol -> bool |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
51 |
val is_digit: symbol -> bool |
| 12904 | 52 |
val is_quasi: symbol -> bool |
| 14678 | 53 |
val is_blank: symbol -> bool |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
54 |
val is_quasi_letter: symbol -> bool |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
55 |
val is_letdig: symbol -> bool |
| 16138 | 56 |
val is_ident: symbol list -> bool |
| 14728 | 57 |
val beginning: int -> symbol list -> string |
| 14678 | 58 |
val scanner: string -> (string list -> 'a * string list) -> symbol list -> 'a |
| 13730 | 59 |
val scan_id: string list -> string * string list |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
60 |
val source: (string, 'a) Source.source -> (symbol, (string, 'a) Source.source) Source.source |
| 6272 | 61 |
val explode: string -> symbol list |
| 31425 | 62 |
val esc: symbol -> string |
|
14977
77d88064991a
added escape, export encode_raw, default mode now trivial, tuned;
wenzelm
parents:
14961
diff
changeset
|
63 |
val escape: string -> string |
| 14678 | 64 |
val strip_blanks: string -> string |
65 |
val bump_init: string -> string |
|
| 12904 | 66 |
val bump_string: string -> string |
| 14678 | 67 |
val length: symbol list -> int |
| 6692 | 68 |
val xsymbolsN: string |
|
40131
7cbebd636e79
explicitly qualify type Output.output, which is a slightly odd internal feature;
wenzelm
parents:
37728
diff
changeset
|
69 |
val output: string -> Output.output * int |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
70 |
end; |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
71 |
|
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
72 |
structure Symbol: SYMBOL = |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
73 |
struct |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
74 |
|
| 14678 | 75 |
(** type symbol **) |
| 6272 | 76 |
|
| 14678 | 77 |
(*Symbols, which are considered the smallest entities of any Isabelle |
| 6272 | 78 |
string, may be of the following form: |
| 14678 | 79 |
|
| 14834 | 80 |
(1) ASCII symbols: a |
| 17823 | 81 |
(2) regular symbols: \<ident> |
| 14834 | 82 |
(3) control symbols: \<^ident> |
83 |
(4) raw control symbols: \<^raw:...>, where "..." may be any printable |
|
|
20205
7b2958d3d575
raw symbols: disallow dot to avoid confusion in NameSpace.unpack;
wenzelm
parents:
20200
diff
changeset
|
84 |
character (excluding ".", ">"), or \<^raw000> |
| 6272 | 85 |
|
| 14678 | 86 |
Output is subject to the print_mode variable (default: verbatim), |
87 |
actual interpretation in display is up to front-end tools. |
|
| 6272 | 88 |
*) |
89 |
||
90 |
type symbol = string; |
|
91 |
||
| 26524 | 92 |
val SOH = chr 1; |
93 |
val STX = chr 2; |
|
|
26538
d65504ffb47d
replaced ETX/EOT by ENQ/ACK, which are less likely to be interpreted by tty etc.;
wenzelm
parents:
26524
diff
changeset
|
94 |
val ENQ = chr 5; |
|
d65504ffb47d
replaced ETX/EOT by ENQ/ACK, which are less likely to be interpreted by tty etc.;
wenzelm
parents:
26524
diff
changeset
|
95 |
val ACK = chr 6; |
| 26524 | 96 |
val DEL = chr 127; |
97 |
||
98 |
val space = chr 32; |
|
| 17063 | 99 |
|
100 |
local |
|
101 |
val small_spaces = Vector.tabulate (65, fn i => Library.replicate_string i space); |
|
102 |
in |
|
103 |
fun spaces k = |
|
104 |
if k < 64 then Vector.sub (small_spaces, k) |
|
105 |
else Library.replicate_string (k div 64) (Vector.sub (small_spaces, 64)) ^ |
|
106 |
Vector.sub (small_spaces, k mod 64); |
|
107 |
end; |
|
| 14678 | 108 |
|
109 |
fun is_char s = size s = 1; |
|
110 |
||
|
37533
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
111 |
fun is_utf8 s = size s > 0 andalso forall_string (fn c => ord c >= 128) s; |
|
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
112 |
|
| 14678 | 113 |
fun is_symbolic s = |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
114 |
String.isPrefix "\\<" s andalso String.isSuffix ">" s andalso not (String.isPrefix "\\<^" s); |
| 14678 | 115 |
|
116 |
fun is_printable s = |
|
117 |
if is_char s then ord space <= ord s andalso ord s <= ord "~" |
|
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
118 |
else is_utf8 s orelse is_symbolic s; |
| 26632 | 119 |
|
| 6272 | 120 |
|
| 14678 | 121 |
(* input source control *) |
| 6272 | 122 |
|
| 14678 | 123 |
val eof = ""; |
| 6272 | 124 |
fun is_eof s = s = eof; |
125 |
fun not_eof s = s <> eof; |
|
| 27732 | 126 |
val stopper = Scan.stopper (K eof) is_eof; |
| 6272 | 127 |
|
| 14678 | 128 |
val sync = "\\<^sync>"; |
129 |
fun is_sync s = s = sync; |
|
130 |
||
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
131 |
fun is_regular s = not_eof s andalso s <> sync; |
| 25641 | 132 |
|
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
133 |
fun is_malformed s = String.isPrefix "\\<" s andalso not (String.isSuffix ">" s); |
|
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
134 |
fun malformed_msg s = "Malformed symbolic character: " ^ quote s; |
| 14678 | 135 |
|
136 |
||
| 43418 | 137 |
(* ASCII symbols *) |
| 14678 | 138 |
|
139 |
fun is_ascii s = is_char s andalso ord s < 128; |
|
140 |
||
141 |
fun is_ascii_letter s = |
|
142 |
is_char s andalso |
|
143 |
(ord "A" <= ord s andalso ord s <= ord "Z" orelse |
|
144 |
ord "a" <= ord s andalso ord s <= ord "z"); |
|
145 |
||
146 |
fun is_ascii_digit s = |
|
147 |
is_char s andalso ord "0" <= ord s andalso ord s <= ord "9"; |
|
148 |
||
|
24580
916259859344
replaced Symbol.is_hex_letter to Symbol.is_ascii_hex;
wenzelm
parents:
23784
diff
changeset
|
149 |
fun is_ascii_hex s = |
|
916259859344
replaced Symbol.is_hex_letter to Symbol.is_ascii_hex;
wenzelm
parents:
23784
diff
changeset
|
150 |
is_char s andalso |
|
916259859344
replaced Symbol.is_hex_letter to Symbol.is_ascii_hex;
wenzelm
parents:
23784
diff
changeset
|
151 |
(ord "0" <= ord s andalso ord s <= ord "9" orelse |
|
916259859344
replaced Symbol.is_hex_letter to Symbol.is_ascii_hex;
wenzelm
parents:
23784
diff
changeset
|
152 |
ord "A" <= ord s andalso ord s <= ord "F" orelse |
|
916259859344
replaced Symbol.is_hex_letter to Symbol.is_ascii_hex;
wenzelm
parents:
23784
diff
changeset
|
153 |
ord "a" <= ord s andalso ord s <= ord "f"); |
|
916259859344
replaced Symbol.is_hex_letter to Symbol.is_ascii_hex;
wenzelm
parents:
23784
diff
changeset
|
154 |
|
| 14678 | 155 |
fun is_ascii_quasi "_" = true |
156 |
| is_ascii_quasi "'" = true |
|
157 |
| is_ascii_quasi _ = false; |
|
158 |
||
159 |
val is_ascii_blank = |
|
|
24580
916259859344
replaced Symbol.is_hex_letter to Symbol.is_ascii_hex;
wenzelm
parents:
23784
diff
changeset
|
160 |
fn " " => true | "\t" => true | "\n" => true | "\^K" => true | "\^L" => true | "\^M" => true |
| 14678 | 161 |
| _ => false; |
162 |
||
|
34095
c2f176a38448
robust representation of low ASCII control characters within XML/YXML text;
wenzelm
parents:
33955
diff
changeset
|
163 |
fun is_ascii_control s = is_char s andalso ord s < 32 andalso not (is_ascii_blank s); |
|
c2f176a38448
robust representation of low ASCII control characters within XML/YXML text;
wenzelm
parents:
33955
diff
changeset
|
164 |
|
| 20200 | 165 |
fun is_ascii_lower s = is_char s andalso (ord "a" <= ord s andalso ord s <= ord "z"); |
166 |
fun is_ascii_upper s = is_char s andalso (ord "A" <= ord s andalso ord s <= ord "Z"); |
|
167 |
||
168 |
fun to_ascii_lower s = if is_ascii_upper s then chr (ord s + ord "a" - ord "A") else s; |
|
169 |
fun to_ascii_upper s = if is_ascii_lower s then chr (ord s + ord "A" - ord "a") else s; |
|
170 |
||
| 14678 | 171 |
|
|
14956
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
172 |
(* encode_raw *) |
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
173 |
|
|
20205
7b2958d3d575
raw symbols: disallow dot to avoid confusion in NameSpace.unpack;
wenzelm
parents:
20200
diff
changeset
|
174 |
fun raw_chr c = |
|
7b2958d3d575
raw symbols: disallow dot to avoid confusion in NameSpace.unpack;
wenzelm
parents:
20200
diff
changeset
|
175 |
ord space <= ord c andalso ord c <= ord "~" andalso c <> "." andalso c <> ">" |
| 17823 | 176 |
orelse ord c >= 128; |
|
14956
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
177 |
|
| 29324 | 178 |
fun encode_raw "" = "" |
179 |
| encode_raw str = |
|
180 |
let |
|
181 |
val raw0 = enclose "\\<^raw:" ">"; |
|
182 |
val raw1 = raw0 o implode; |
|
183 |
val raw2 = enclose "\\<^raw" ">" o string_of_int o ord; |
|
184 |
||
| 33955 | 185 |
fun encode cs = enc (take_prefix raw_chr cs) |
| 29324 | 186 |
and enc ([], []) = [] |
187 |
| enc (cs, []) = [raw1 cs] |
|
188 |
| enc ([], d :: ds) = raw2 d :: encode ds |
|
189 |
| enc (cs, d :: ds) = raw1 cs :: raw2 d :: encode ds; |
|
190 |
in |
|
|
40627
becf5d5187cc
renamed raw "explode" function to "raw_explode" to emphasize its meaning;
wenzelm
parents:
40523
diff
changeset
|
191 |
if exists_string (not o raw_chr) str then implode (encode (raw_explode str)) |
| 29324 | 192 |
else raw0 str |
193 |
end; |
|
|
14956
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
194 |
|
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
195 |
|
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
196 |
(* diagnostics *) |
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
197 |
|
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
198 |
fun beginning n cs = |
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
199 |
let |
| 33955 | 200 |
val drop_blanks = #1 o take_suffix is_ascii_blank; |
|
14956
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
201 |
val all_cs = drop_blanks cs; |
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
202 |
val dots = if length all_cs > n then " ..." else ""; |
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
203 |
in |
| 33955 | 204 |
(drop_blanks (take n all_cs) |
|
14956
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
205 |
|> map (fn c => if is_ascii_blank c then space else c) |
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
206 |
|> implode) ^ dots |
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
207 |
end; |
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
208 |
|
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
209 |
|
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
210 |
(* decode_raw *) |
| 14834 | 211 |
|
212 |
fun is_raw s = |
|
| 17063 | 213 |
String.isPrefix "\\<^raw" s andalso String.isSuffix ">" s; |
| 14834 | 214 |
|
215 |
fun decode_raw s = |
|
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
216 |
if not (is_raw s) then error (malformed_msg s) |
| 14834 | 217 |
else if String.isPrefix "\\<^raw:" s then String.substring (s, 7, size s - 8) |
|
40627
becf5d5187cc
renamed raw "explode" function to "raw_explode" to emphasize its meaning;
wenzelm
parents:
40523
diff
changeset
|
218 |
else chr (#1 (Library.read_int (raw_explode (String.substring (s, 6, size s - 7))))); |
| 14834 | 219 |
|
220 |
||
| 14873 | 221 |
(* symbol variants *) |
222 |
||
|
37533
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
223 |
datatype sym = |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
224 |
Char of string | UTF8 of string | Sym of string | Ctrl of string | Raw of string | |
| 43485 | 225 |
Malformed of string | EOF; |
| 14873 | 226 |
|
227 |
fun decode s = |
|
| 43485 | 228 |
if s = "" then EOF |
229 |
else if is_char s then Char s |
|
|
37533
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
230 |
else if is_utf8 s then UTF8 s |
| 14873 | 231 |
else if is_raw s then Raw (decode_raw s) |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
232 |
else if is_malformed s then Malformed s |
| 14873 | 233 |
else if String.isPrefix "\\<^" s then Ctrl (String.substring (s, 3, size s - 4)) |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
234 |
else Sym (String.substring (s, 2, size s - 3)); |
| 14873 | 235 |
|
236 |
||
| 14678 | 237 |
(* standard symbol kinds *) |
238 |
||
239 |
datatype kind = Letter | Digit | Quasi | Blank | Other; |
|
| 6272 | 240 |
|
|
14171
0cab06e3bbd0
Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents:
13730
diff
changeset
|
241 |
local |
| 14678 | 242 |
val symbol_kinds = Symtab.make |
243 |
[("\\<A>", Letter),
|
|
244 |
("\\<B>", Letter),
|
|
245 |
("\\<C>", Letter),
|
|
246 |
("\\<D>", Letter),
|
|
247 |
("\\<E>", Letter),
|
|
248 |
("\\<F>", Letter),
|
|
249 |
("\\<G>", Letter),
|
|
250 |
("\\<H>", Letter),
|
|
251 |
("\\<I>", Letter),
|
|
252 |
("\\<J>", Letter),
|
|
253 |
("\\<K>", Letter),
|
|
254 |
("\\<L>", Letter),
|
|
255 |
("\\<M>", Letter),
|
|
256 |
("\\<N>", Letter),
|
|
257 |
("\\<O>", Letter),
|
|
258 |
("\\<P>", Letter),
|
|
259 |
("\\<Q>", Letter),
|
|
260 |
("\\<R>", Letter),
|
|
261 |
("\\<S>", Letter),
|
|
262 |
("\\<T>", Letter),
|
|
263 |
("\\<U>", Letter),
|
|
264 |
("\\<V>", Letter),
|
|
265 |
("\\<W>", Letter),
|
|
266 |
("\\<X>", Letter),
|
|
267 |
("\\<Y>", Letter),
|
|
268 |
("\\<Z>", Letter),
|
|
269 |
("\\<a>", Letter),
|
|
270 |
("\\<b>", Letter),
|
|
271 |
("\\<c>", Letter),
|
|
272 |
("\\<d>", Letter),
|
|
273 |
("\\<e>", Letter),
|
|
274 |
("\\<f>", Letter),
|
|
275 |
("\\<g>", Letter),
|
|
276 |
("\\<h>", Letter),
|
|
277 |
("\\<i>", Letter),
|
|
278 |
("\\<j>", Letter),
|
|
279 |
("\\<k>", Letter),
|
|
280 |
("\\<l>", Letter),
|
|
281 |
("\\<m>", Letter),
|
|
282 |
("\\<n>", Letter),
|
|
283 |
("\\<o>", Letter),
|
|
284 |
("\\<p>", Letter),
|
|
285 |
("\\<q>", Letter),
|
|
286 |
("\\<r>", Letter),
|
|
287 |
("\\<s>", Letter),
|
|
288 |
("\\<t>", Letter),
|
|
289 |
("\\<u>", Letter),
|
|
290 |
("\\<v>", Letter),
|
|
291 |
("\\<w>", Letter),
|
|
292 |
("\\<x>", Letter),
|
|
293 |
("\\<y>", Letter),
|
|
294 |
("\\<z>", Letter),
|
|
295 |
("\\<AA>", Letter),
|
|
296 |
("\\<BB>", Letter),
|
|
297 |
("\\<CC>", Letter),
|
|
298 |
("\\<DD>", Letter),
|
|
299 |
("\\<EE>", Letter),
|
|
300 |
("\\<FF>", Letter),
|
|
301 |
("\\<GG>", Letter),
|
|
302 |
("\\<HH>", Letter),
|
|
303 |
("\\<II>", Letter),
|
|
304 |
("\\<JJ>", Letter),
|
|
305 |
("\\<KK>", Letter),
|
|
306 |
("\\<LL>", Letter),
|
|
307 |
("\\<MM>", Letter),
|
|
308 |
("\\<NN>", Letter),
|
|
309 |
("\\<OO>", Letter),
|
|
310 |
("\\<PP>", Letter),
|
|
311 |
("\\<QQ>", Letter),
|
|
312 |
("\\<RR>", Letter),
|
|
313 |
("\\<SS>", Letter),
|
|
314 |
("\\<TT>", Letter),
|
|
315 |
("\\<UU>", Letter),
|
|
316 |
("\\<VV>", Letter),
|
|
317 |
("\\<WW>", Letter),
|
|
318 |
("\\<XX>", Letter),
|
|
319 |
("\\<YY>", Letter),
|
|
320 |
("\\<ZZ>", Letter),
|
|
321 |
("\\<aa>", Letter),
|
|
322 |
("\\<bb>", Letter),
|
|
323 |
("\\<cc>", Letter),
|
|
324 |
("\\<dd>", Letter),
|
|
325 |
("\\<ee>", Letter),
|
|
326 |
("\\<ff>", Letter),
|
|
327 |
("\\<gg>", Letter),
|
|
328 |
("\\<hh>", Letter),
|
|
329 |
("\\<ii>", Letter),
|
|
330 |
("\\<jj>", Letter),
|
|
331 |
("\\<kk>", Letter),
|
|
332 |
("\\<ll>", Letter),
|
|
333 |
("\\<mm>", Letter),
|
|
334 |
("\\<nn>", Letter),
|
|
335 |
("\\<oo>", Letter),
|
|
336 |
("\\<pp>", Letter),
|
|
337 |
("\\<qq>", Letter),
|
|
338 |
("\\<rr>", Letter),
|
|
339 |
("\\<ss>", Letter),
|
|
340 |
("\\<tt>", Letter),
|
|
341 |
("\\<uu>", Letter),
|
|
342 |
("\\<vv>", Letter),
|
|
343 |
("\\<ww>", Letter),
|
|
344 |
("\\<xx>", Letter),
|
|
345 |
("\\<yy>", Letter),
|
|
346 |
("\\<zz>", Letter),
|
|
347 |
("\\<alpha>", Letter),
|
|
348 |
("\\<beta>", Letter),
|
|
349 |
("\\<gamma>", Letter),
|
|
350 |
("\\<delta>", Letter),
|
|
351 |
("\\<epsilon>", Letter),
|
|
352 |
("\\<zeta>", Letter),
|
|
353 |
("\\<eta>", Letter),
|
|
354 |
("\\<theta>", Letter),
|
|
355 |
("\\<iota>", Letter),
|
|
356 |
("\\<kappa>", Letter),
|
|
357 |
("\\<lambda>", Other), (*sic!*)
|
|
358 |
("\\<mu>", Letter),
|
|
359 |
("\\<nu>", Letter),
|
|
360 |
("\\<xi>", Letter),
|
|
361 |
("\\<pi>", Letter),
|
|
362 |
("\\<rho>", Letter),
|
|
363 |
("\\<sigma>", Letter),
|
|
364 |
("\\<tau>", Letter),
|
|
365 |
("\\<upsilon>", Letter),
|
|
366 |
("\\<phi>", Letter),
|
|
| 25521 | 367 |
("\\<chi>", Letter),
|
| 14678 | 368 |
("\\<psi>", Letter),
|
369 |
("\\<omega>", Letter),
|
|
370 |
("\\<Gamma>", Letter),
|
|
371 |
("\\<Delta>", Letter),
|
|
372 |
("\\<Theta>", Letter),
|
|
373 |
("\\<Lambda>", Letter),
|
|
374 |
("\\<Xi>", Letter),
|
|
375 |
("\\<Pi>", Letter),
|
|
376 |
("\\<Sigma>", Letter),
|
|
377 |
("\\<Upsilon>", Letter),
|
|
378 |
("\\<Phi>", Letter),
|
|
379 |
("\\<Psi>", Letter),
|
|
380 |
("\\<Omega>", Letter),
|
|
| 14961 | 381 |
("\\<^isub>", Letter),
|
382 |
("\\<^isup>", Letter),
|
|
| 14678 | 383 |
("\\<spacespace>", Blank)];
|
|
14171
0cab06e3bbd0
Extended the notion of letter and digit, such that now one may use greek,
skalberg
parents:
13730
diff
changeset
|
384 |
in |
| 14678 | 385 |
fun kind s = |
386 |
if is_ascii_letter s then Letter |
|
387 |
else if is_ascii_digit s then Digit |
|
388 |
else if is_ascii_quasi s then Quasi |
|
389 |
else if is_ascii_blank s then Blank |
|
390 |
else if is_char s then Other |
|
| 18939 | 391 |
else the_default Other (Symtab.lookup symbol_kinds s); |
| 14678 | 392 |
end; |
| 14173 | 393 |
|
| 14678 | 394 |
fun is_letter s = kind s = Letter; |
395 |
fun is_digit s = kind s = Digit; |
|
396 |
fun is_quasi s = kind s = Quasi; |
|
397 |
fun is_blank s = kind s = Blank; |
|
| 6272 | 398 |
|
| 14678 | 399 |
fun is_quasi_letter s = let val k = kind s in k = Letter orelse k = Quasi end; |
400 |
fun is_letdig s = let val k = kind s in k = Letter orelse k = Digit orelse k = Quasi end; |
|
| 11010 | 401 |
|
| 16138 | 402 |
fun is_ident [] = false |
403 |
| is_ident (c :: cs) = is_letter c andalso forall is_letdig cs; |
|
404 |
||
| 6272 | 405 |
|
406 |
||
| 14678 | 407 |
(** symbol input **) |
408 |
||
409 |
(* scanning through symbols *) |
|
| 6272 | 410 |
|
| 6640 | 411 |
fun scanner msg scan chs = |
412 |
let |
|
| 15531 | 413 |
fun message (cs, NONE) = msg ^ ": " ^ quote (beginning 10 cs) |
414 |
| message (cs, SOME msg') = msg ^ ", " ^ msg' ^ ": " ^ quote (beginning 10 cs); |
|
| 14961 | 415 |
val fin_scan = Scan.error (Scan.finite stopper (!! message scan)); |
| 6640 | 416 |
in |
417 |
(case fin_scan chs of |
|
418 |
(result, []) => result |
|
| 15531 | 419 |
| (_, rest) => error (message (rest, NONE))) |
| 6640 | 420 |
end; |
421 |
||
|
21858
05f57309170c
avoid conflict with Alice keywords: renamed pack -> implode, unpack -> explode, any -> many, avoided assert;
wenzelm
parents:
21495
diff
changeset
|
422 |
val scan_id = Scan.one is_letter ^^ (Scan.many is_letdig >> implode); |
| 14678 | 423 |
|
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
424 |
|
|
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
425 |
(* source *) |
|
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
426 |
|
| 14678 | 427 |
local |
|
14561
c53396af770e
* raw control symbols are of the form \<^raw:...> now.
schirmer
parents:
14559
diff
changeset
|
428 |
|
|
37533
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
429 |
fun is_plain s = is_ascii s andalso s <> "\^M" andalso s <> "\\"; |
|
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
430 |
|
|
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
431 |
fun is_utf8_trailer s = is_char s andalso 128 <= ord s andalso ord s < 192; |
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
432 |
|
|
37728
5d2b3e827371
implode pseudo utf8, i.e. decode byte-stuffed low ASCII characters;
wenzelm
parents:
37534
diff
changeset
|
433 |
fun implode_pseudo_utf8 (cs as ["\192", c]) = |
|
5d2b3e827371
implode pseudo utf8, i.e. decode byte-stuffed low ASCII characters;
wenzelm
parents:
37534
diff
changeset
|
434 |
if ord c < 160 then chr (ord c - 128) else implode cs |
|
5d2b3e827371
implode pseudo utf8, i.e. decode byte-stuffed low ASCII characters;
wenzelm
parents:
37534
diff
changeset
|
435 |
| implode_pseudo_utf8 cs = implode cs; |
|
5d2b3e827371
implode pseudo utf8, i.e. decode byte-stuffed low ASCII characters;
wenzelm
parents:
37534
diff
changeset
|
436 |
|
| 14678 | 437 |
val scan_encoded_newline = |
| 17756 | 438 |
$$ "\^M" -- $$ "\n" >> K "\n" || |
439 |
$$ "\^M" >> K "\n" || |
|
|
31545
5f1f0a20af4d
discontinued escaped symbols such as \\<forall> -- only one backslash should be used;
wenzelm
parents:
31425
diff
changeset
|
440 |
Scan.this_string "\\<^newline>" >> K "\n"; |
|
14956
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
441 |
|
|
70ec4b8aef8d
prevent looping of error messages involving malformed symbols;
wenzelm
parents:
14908
diff
changeset
|
442 |
val scan_raw = |
|
21858
05f57309170c
avoid conflict with Alice keywords: renamed pack -> implode, unpack -> explode, any -> many, avoided assert;
wenzelm
parents:
21495
diff
changeset
|
443 |
Scan.this_string "raw:" ^^ (Scan.many raw_chr >> implode) || |
|
05f57309170c
avoid conflict with Alice keywords: renamed pack -> implode, unpack -> explode, any -> many, avoided assert;
wenzelm
parents:
21495
diff
changeset
|
444 |
Scan.this_string "raw" ^^ (Scan.many1 is_ascii_digit >> implode); |
| 14678 | 445 |
|
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
446 |
val scan_total = |
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
447 |
Scan.one is_plain || |
|
37728
5d2b3e827371
implode pseudo utf8, i.e. decode byte-stuffed low ASCII characters;
wenzelm
parents:
37534
diff
changeset
|
448 |
Scan.one is_utf8 ::: Scan.many is_utf8_trailer >> implode_pseudo_utf8 || |
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
449 |
scan_encoded_newline || |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
450 |
($$ "\\" ^^ $$ "<" ^^ (($$ "^" ^^ (scan_raw || scan_id) || scan_id) ^^ $$ ">")) || |
|
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
451 |
Scan.this_string "\\<^" || |
|
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
452 |
Scan.this_string "\\<" || |
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
453 |
Scan.one not_eof; |
|
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
454 |
|
| 14678 | 455 |
in |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
456 |
|
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
457 |
fun source src = Source.source stopper (Scan.bulk scan_total) NONE src; |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
458 |
|
| 14678 | 459 |
end; |
460 |
||
|
14562
980da32f4617
proper handling of lines terminated by CRLF or CR;
wenzelm
parents:
14561
diff
changeset
|
461 |
|
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
462 |
(* explode *) |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
463 |
|
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
464 |
local |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
465 |
|
|
14562
980da32f4617
proper handling of lines terminated by CRLF or CR;
wenzelm
parents:
14561
diff
changeset
|
466 |
fun no_explode [] = true |
|
980da32f4617
proper handling of lines terminated by CRLF or CR;
wenzelm
parents:
14561
diff
changeset
|
467 |
| no_explode ("\\" :: "<" :: _) = false
|
| 17756 | 468 |
| no_explode ("\^M" :: _) = false
|
|
37533
d775bd70f571
explicit treatment of UTF8 character sequences as Isabelle symbols;
wenzelm
parents:
34095
diff
changeset
|
469 |
| no_explode (c :: cs) = is_ascii c andalso no_explode cs; |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
470 |
|
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
471 |
in |
|
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
472 |
|
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
473 |
fun sym_explode str = |
|
40627
becf5d5187cc
renamed raw "explode" function to "raw_explode" to emphasize its meaning;
wenzelm
parents:
40523
diff
changeset
|
474 |
let val chs = raw_explode str in |
|
14562
980da32f4617
proper handling of lines terminated by CRLF or CR;
wenzelm
parents:
14561
diff
changeset
|
475 |
if no_explode chs then chs |
|
40523
1050315f6ee2
simplified/robustified treatment of malformed symbols, which are now fully internalized (total Symbol.explode etc.);
wenzelm
parents:
40509
diff
changeset
|
476 |
else Source.exhaust (source (Source.of_list chs)) |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
477 |
end; |
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
478 |
|
|
23676
ea9b7e9c2301
scan: changed treatment of malformed symbols, passed to next stage;
wenzelm
parents:
23618
diff
changeset
|
479 |
end; |
| 14994 | 480 |
|
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
481 |
|
|
14977
77d88064991a
added escape, export encode_raw, default mode now trivial, tuned;
wenzelm
parents:
14961
diff
changeset
|
482 |
(* escape *) |
|
77d88064991a
added escape, export encode_raw, default mode now trivial, tuned;
wenzelm
parents:
14961
diff
changeset
|
483 |
|
| 37534 | 484 |
val esc = fn s => |
485 |
if is_char s then s |
|
486 |
else if is_utf8 s then translate_string (fn c => "\\" ^ string_of_int (ord c)) s |
|
487 |
else "\\" ^ s; |
|
488 |
||
| 31425 | 489 |
val escape = implode o map esc o sym_explode; |
|
14977
77d88064991a
added escape, export encode_raw, default mode now trivial, tuned;
wenzelm
parents:
14961
diff
changeset
|
490 |
|
|
77d88064991a
added escape, export encode_raw, default mode now trivial, tuned;
wenzelm
parents:
14961
diff
changeset
|
491 |
|
| 14678 | 492 |
(* blanks *) |
493 |
||
494 |
fun strip_blanks s = |
|
495 |
sym_explode s |
|
| 33955 | 496 |
|> take_prefix is_blank |> #2 |
497 |
|> take_suffix is_blank |> #1 |
|
| 14678 | 498 |
|> implode; |
499 |
||
500 |
||
501 |
(* bump string -- treat as base 26 or base 1 numbers *) |
|
502 |
||
| 15979 | 503 |
fun symbolic_end (_ :: "\\<^isub>" :: _) = true |
504 |
| symbolic_end (_ :: "\\<^isup>" :: _) = true |
|
| 14908 | 505 |
| symbolic_end (s :: _) = is_symbolic s |
506 |
| symbolic_end [] = false; |
|
| 14678 | 507 |
|
508 |
fun bump_init str = |
|
| 14908 | 509 |
if symbolic_end (rev (sym_explode str)) then str ^ "'" |
| 14678 | 510 |
else str ^ "a"; |
| 12904 | 511 |
|
512 |
fun bump_string str = |
|
513 |
let |
|
514 |
fun bump [] = ["a"] |
|
515 |
| bump ("z" :: ss) = "a" :: bump ss
|
|
516 |
| bump (s :: ss) = |
|
| 14678 | 517 |
if is_char s andalso ord "a" <= ord s andalso ord s < ord "z" |
| 12904 | 518 |
then chr (ord s + 1) :: ss |
519 |
else "a" :: s :: ss; |
|
| 14678 | 520 |
|
| 33955 | 521 |
val (ss, qs) = apfst rev (take_suffix is_quasi (sym_explode str)); |
| 14908 | 522 |
val ss' = if symbolic_end ss then "'" :: ss else bump ss; |
| 14678 | 523 |
in implode (rev ss' @ qs) end; |
524 |
||
| 12904 | 525 |
|
| 6272 | 526 |
|
| 29324 | 527 |
(** symbol output **) |
|
14977
77d88064991a
added escape, export encode_raw, default mode now trivial, tuned;
wenzelm
parents:
14961
diff
changeset
|
528 |
|
| 29324 | 529 |
(* length *) |
| 6272 | 530 |
|
| 14678 | 531 |
fun sym_len s = |
|
24593
1547ea587f5a
added some int constraints (ML_Parse.fix_ints not active here);
wenzelm
parents:
24580
diff
changeset
|
532 |
if not (is_printable s) then (0: int) |
| 14678 | 533 |
else if String.isPrefix "\\<long" s then 2 |
534 |
else if String.isPrefix "\\<Long" s then 2 |
|
535 |
else if s = "\\<spacespace>" then 2 |
|
536 |
else 1; |
|
537 |
||
| 19473 | 538 |
fun sym_length ss = fold (fn s => fn n => sym_len s + n) ss 0; |
| 14678 | 539 |
|
| 29324 | 540 |
|
541 |
(* print mode *) |
|
542 |
||
543 |
val xsymbolsN = "xsymbols"; |
|
544 |
||
545 |
fun output s = (s, sym_length (sym_explode s)); |
|
546 |
||
547 |
||
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
548 |
(*final declarations of this structure!*) |
| 29324 | 549 |
val explode = sym_explode; |
| 6272 | 550 |
val length = sym_length; |
|
6116
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
551 |
|
|
8ba2f25610f7
files scan.ML, source.ML, symbol.ML, pretty.ML moved to Pure/General;
wenzelm
parents:
diff
changeset
|
552 |
end; |