package re

  1. Overview
  2. Docs

Source file category.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
type t = int

let equal (x : int) (y : int) = x = y
let compare (x : int) (y : int) = compare x y
let to_int x = x
let pp = Format.pp_print_int
let intersect x y = x land y <> 0
let ( ++ ) x y = x lor y
let dummy = -1
let inexistant = 1
let letter = 2
let not_letter = 4
let newline = 8
let lastnewline = 16
let search_boundary = 32

let from_char = function
  (* Should match [cword] definition *)
  | 'a' .. 'z'
  | 'A' .. 'Z'
  | '0' .. '9'
  | '_' | '\170' | '\181' | '\186'
  | '\192' .. '\214'
  | '\216' .. '\246'
  | '\248' .. '\255' -> letter
  | '\n' -> not_letter ++ newline
  | _ -> not_letter
;;
OCaml

Innovation. Community. Security.