equal
deleted
inserted
replaced
184 fun is_meta c = c mem ["(", ")", "/", "_"]; |
184 fun is_meta c = c mem ["(", ")", "/", "_"]; |
185 |
185 |
186 fun scan_delim_char ("'" :: c :: cs) = |
186 fun scan_delim_char ("'" :: c :: cs) = |
187 if is_blank c then raise LEXICAL_ERROR else (c, cs) |
187 if is_blank c then raise LEXICAL_ERROR else (c, cs) |
188 | scan_delim_char ["'"] = err "trailing escape character" |
188 | scan_delim_char ["'"] = err "trailing escape character" |
|
189 | scan_delim_char ("\\" :: "{" :: cs) = |
|
190 let |
|
191 val (ch_name, cs') = (scan_id -- $$ "}" >> #1) cs |
|
192 handle LEXICAL_ERROR => err "malformed symbolic char specification"; |
|
193 val c = |
|
194 if ch_name mem SymbolFont.char_names then |
|
195 SymbolFont.char ch_name |
|
196 else err ("unknown symbolic char name: " ^ quote ch_name); |
|
197 in (c, cs') end |
189 | scan_delim_char (chs as c :: cs) = |
198 | scan_delim_char (chs as c :: cs) = |
190 if is_blank c orelse is_meta c then raise LEXICAL_ERROR else (c, cs) |
199 if is_blank c orelse is_meta c then raise LEXICAL_ERROR else (c, cs) |
191 | scan_delim_char [] = raise LEXICAL_ERROR; |
200 | scan_delim_char [] = raise LEXICAL_ERROR; |
192 |
201 |
193 val scan_sym = |
202 val scan_sym = |