Expand description
libxml2’s internal regex engine (§85 Phase 7).
libxml2 uses its own regex engine (xmlregexp.c) for XML Schema pattern facets, XSLT template match patterns, and other internal uses. Must match upstream behavior exactly.
Implements an NFA-based regex engine using Thompson’s construction:
- Compilation: regex pattern → NFA
- Execution: NFA simulation with state-set tracking
- Incremental matching: push strings into an execution context
- Determinism check
Structs§
- RegExec
Ctxt - Incremental regex execution context.
- XmlRegexp
- Compiled regular expression.
Functions§
- xmlReg
Exec ⚠Push String - Push a string into the incremental regex execution context.
- xmlReg
Free ⚠Exec Ctxt - Free an incremental regex execution context.
- xmlReg
Free ⚠Regexp - Free a compiled regex.
- xmlReg
NewExec ⚠Ctxt - Create an incremental regex execution context.
- xmlRegexp
Compile ⚠ - Compile a regex pattern.
- xmlRegexp
Exec ⚠ - Execute a compiled regex against a string.
- xmlRegexp
IsDeterministic ⚠ - Check if a compiled regex is deterministic.
- xmlRegexp
Print ⚠ - Print a compiled regex for debugging.