package re
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
RE is a regular expression library for OCaml
Install
dune-project
Dependency
github.com
Readme
Changelog
LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception License
Edit opam file
Versions (20)
Authors
Maintainers
Sources
re-1.12.0.tbz
sha256=a01f2bf22f72c2f4ababd8d3e7635e35c1bf6bc5a41ad6d5a007454ddabad1d4
sha512=f0726826e1e677f7ecdf447d46d814a11d3844ec6e5c0527be8c73c7afdb08aacfca47ea764eda325bcd7064aff07c1d3441c935ee5a0fc99ede8707f81a451d
doc/src/re/parse_buffer.ml.html
Source file parse_buffer.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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72type t = { str : string ; mutable pos : int } exception Parse_error let create str = { str; pos = 0 } let unget t = t.pos <- t.pos - 1 let junk t = t.pos <- t.pos + 1 let eos t = t.pos = String.length t.str let test t c = (not (eos t)) && t.str.[t.pos] = c let test2 t c c' = t.pos + 1 < String.length t.str && t.str.[t.pos] = c && t.str.[t.pos + 1] = c' ;; let accept t c = let r = test t c in if r then t.pos <- t.pos + 1; r ;; let accept2 t c c' = let r = test2 t c c' in if r then t.pos <- t.pos + 2; r ;; let get t = let r = t.str.[t.pos] in t.pos <- t.pos + 1; r ;; let accept_s t s' = let len = String.length s' in try for j = 0 to len - 1 do try if s'.[j] <> t.str.[t.pos + j] then raise_notrace Exit with | _ -> raise_notrace Exit done; t.pos <- t.pos + len; true with | Exit -> false ;; let rec integer' t i = if eos t then Some i else ( match get t with | '0' .. '9' as d -> let i' = (10 * i) + (Char.code d - Char.code '0') in if i' < i then raise Parse_error; integer' t i' | _ -> unget t; Some i) ;; let integer t = if eos t then None else ( match get t with | '0' .. '9' as d -> integer' t (Char.code d - Char.code '0') | _ -> unget t; None) ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>