src/Pure/Syntax/syn_ext.ML
changeset 2201 7cffa6e6fc53
parent 1510 4588ba1b1438
child 2209 e10e02de3e02
equal deleted inserted replaced
2200:2538977e94fa 2201:7cffa6e6fc53
   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 =