equal
deleted
inserted
replaced
19 fun decode_char_nonzero t = |
19 fun decode_char_nonzero t = |
20 case Numeral.dest_num t of |
20 case Numeral.dest_num t of |
21 SOME n => if 0 < n andalso n < 256 then SOME n else NONE |
21 SOME n => if 0 < n andalso n < 256 then SOME n else NONE |
22 | _ => NONE; |
22 | _ => NONE; |
23 |
23 |
24 fun decode_char (IConst { sym = Code_Symbol.Constant @{const_name Groups.zero}, ... }) = |
24 fun decode_char (IConst { sym = Code_Symbol.Constant @{const_name String.zero_char_inst.zero_char}, ... }) = |
25 SOME 0 |
25 SOME 0 |
26 | decode_char (IConst { sym = Code_Symbol.Constant @{const_name Char}, ... } `$ t) = |
26 | decode_char (IConst { sym = Code_Symbol.Constant @{const_name Char}, ... } `$ t) = |
27 decode_char_nonzero t |
27 decode_char_nonzero t |
28 | decode_char _ = NONE |
28 | decode_char _ = NONE |
29 |
29 |