text_parse/syntax.ml
fox 9da2a4e1e4 Parse URIs starting with numbers
git-svn-id: file:///srv/svn/repo/text_parse/trunk@2 cb476dc4-a1c2-9446-a177-162899b6b847
2022-12-20 16:53:17 +00:00

12 lines
339 B
OCaml

module type S = sig
val s: Cursor.t -> char -> bool
val e: Cursor.t -> char -> bool
end
(*let str c = String.make 1 c*)
let newline = function '\n' -> true | _ -> false
let printable ch = ch >= ' ' && ch <= '~'
let letter ch = (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')
let digit = function '0' .. '9' -> true | _ -> false