Module compile

Source
Expand description

This module is responsible for compiling a Thompson NFA (Non-deterministic Finite Automaton) into a WebAssembly module.

Re-exportsยง

pub use crate::error::BuildError;

Modulesยง

context ๐Ÿ”’
This module defines the CompileContext and associated structures used for compiling a regular expression NFA into a WASM module.
epsilon_closure ๐Ÿ”’
This module contains types and functions related to computing the epsilon closure of a given NFA state.
input
This module contains types and functions related to laying out the input options and haystack in the WASM memory.
instructions ๐Ÿ”’
This module contains type for emitting WASM instructions specifically for the regex machine.
lookaround ๐Ÿ”’
This module contains types and functions related to the implementation of [Look]s in WASM.
matching ๐Ÿ”’
This module contains types and functions related to the actual PikeVM execution of is_match, find, captures, etc.
pattern ๐Ÿ”’
This module contains functions and lookup tables relating to multiple patterns in one compiled regex.
sparse_set ๐Ÿ”’
This module defines a sparse set data structure. Its most interesting properties are:
state ๐Ÿ”’
This module contains type and functions related to the entire runtime state of the engine.
transition ๐Ÿ”’
This module contains type and functions related to the NFA transition function.

Structsยง

CompiledRegex
Represents a regular expression that has been compiled into WebAssembly bytes.

Functionsยง

compile_from_nfa
Compiles a given Thompson NFA into a CompiledRegex WebAssembly module, using the provided configuration.