regex/core
sourceregex/core.sx
pub val MAX_REGEXP_OBJECTS = 30
pub val MAX_CHAR_CLASS_LEN = 40
type RegexHandle = { tokens: mut ref void, ccl_buf: mut ref u8 }
Fields
| Name | Type |
|---|
tokens | mut ref void |
ccl_buf | mut ref u8 |
pub enum RegexMatchError = { NullPattern, NullText, NullMatchLength, InvalidCompiledPattern, CompileFailed }
Variants
NullPatternNullTextNullMatchLengthInvalidCompiledPatternCompileFailed
fn char_ptr(ptr: ref u8, offset: i64) ref u8
fn char_at(ptr: ref u8, offset: i64) u8
fn token_ptr(tokens: ref void, idx: i64) ref void
fn token_next(token: ref void, delta: i64) ref void
fn token_kind(token: ref void) i64
fn set_token_kind(token: ref void, kind: i64) void
fn token_ch(token: ref void) u8
fn set_token_ch(token: ref void, ch: u8) void
fn token_ccl(token: ref void) ref u8
fn set_token_ccl(token: ref void, ccl: ref u8) void
fn ccl_slot(buf: ref u8, idx: i64) ref u8
fn alloc_in[T: allocators.GeneralAllocator](ac: T, size: i64) ref void
fn free_in[T: allocators.GeneralAllocator](ac: T, ptr: ref void) void
fn alloc_handle[T: allocators.GeneralAllocator](ac: T) option[ref void]
pub fn re_free_with[T: allocators.GeneralAllocator](ac: T, pattern: ref void) void
pub fn re_free(pattern: ref void) void = trust { ... }
pub fn re_compile_with[T: allocators.GeneralAllocator](ac: T, pattern: ref u8) option[ref void]
pub fn re_compile(pattern: ref u8) option[ref void]
fn matchdigit(c: u8) bool
fn matchalpha(c: u8) bool
fn matchwhitespace(c: u8) bool
fn matchalphanum(c: u8) bool
fn matchrange(c: u8, str: ref u8) bool
fn ismetachar(c: u8) bool
fn matchmetachar(c: u8, str: ref u8) bool
fn matchcharclass(c: u8, str: ref u8) bool
fn matchone(token: ref void, c: u8) bool
fn matchpattern(pattern: ref void, text: ref u8, matchlength: mut ref i64) bool
fn matchstar(token: ref void, pattern: ref void, text: ref u8, matchlength: mut ref i64) bool
fn matchplus(token: ref void, pattern: ref void, text: ref u8, matchlength: mut ref i64) bool
fn matchquestion(token: ref void, pattern: ref void, text: ref u8, matchlength: mut ref i64) bool
pub fn re_matchp(pattern: ref void, text: ref u8, matchlength: mut ref i64) result[option[i64], RegexMatchError] = trust { ... }
pub fn re_match_with[T: allocators.GeneralAllocator](ac: T, pattern: ref u8, text: ref u8, matchlength: mut ref i64) result[option[i64], RegexMatchError]
pub fn re_match(pattern: ref u8, text: ref u8, matchlength: mut ref i64) result[option[i64], RegexMatchError]
fn kind_name(kind: i64) ref u8
fn print_char(c: u8) void = trust { ... }
pub fn re_print(pattern: ref void) void