src/Pure/General/symbol.ML
changeset 73198 a9eaf8c3b728
parent 73163 624c2b98860a
child 77723 b761c91c2447
equal deleted inserted replaced
73197:d967f6643f5e 73198:a9eaf8c3b728
    56   val kind: symbol -> kind
    56   val kind: symbol -> kind
    57   val is_letter: symbol -> bool
    57   val is_letter: symbol -> bool
    58   val is_digit: symbol -> bool
    58   val is_digit: symbol -> bool
    59   val is_quasi: symbol -> bool
    59   val is_quasi: symbol -> bool
    60   val is_blank: symbol -> bool
    60   val is_blank: symbol -> bool
    61   val is_block_ctrl: symbol -> bool
    61   val is_control_block: symbol -> bool
    62   val has_block_ctrl: symbol list -> bool
    62   val has_control_block: symbol list -> bool
    63   val is_quasi_letter: symbol -> bool
    63   val is_quasi_letter: symbol -> bool
    64   val is_letdig: symbol -> bool
    64   val is_letdig: symbol -> bool
    65   val beginning: int -> symbol list -> string
    65   val beginning: int -> symbol list -> string
    66   val esc: symbol -> string
    66   val esc: symbol -> string
    67   val escape: string -> string
    67   val escape: string -> string
   406 fun is_letter s = kind s = Letter;
   406 fun is_letter s = kind s = Letter;
   407 fun is_digit s = kind s = Digit;
   407 fun is_digit s = kind s = Digit;
   408 fun is_quasi s = kind s = Quasi;
   408 fun is_quasi s = kind s = Quasi;
   409 fun is_blank s = kind s = Blank;
   409 fun is_blank s = kind s = Blank;
   410 
   410 
   411 val is_block_ctrl = member (op =) ["\<^bsub>", "\<^esub>", "\<^bsup>", "\<^esup>"];
   411 val is_control_block = member (op =) ["\<^bsub>", "\<^esub>", "\<^bsup>", "\<^esup>"];
   412 val has_block_ctrl = exists is_block_ctrl;
   412 val has_control_block = exists is_control_block;
   413 
   413 
   414 fun is_quasi_letter s = let val k = kind s in k = Letter orelse k = Quasi end;
   414 fun is_quasi_letter s = let val k = kind s in k = Letter orelse k = Quasi end;
   415 fun is_letdig s = let val k = kind s in k = Letter orelse k = Digit orelse k = Quasi end;
   415 fun is_letdig s = let val k = kind s in k = Letter orelse k = Digit orelse k = Quasi end;
   416 
   416 
   417 
   417