|
libsnobol4 1.0.2
High-performance SNOBOL4-style pattern matching library
|
VM state: all mutable state for a single pattern execution. More...
#include <vm.h>

Public Attributes | |
| const uint8_t * | bc |
| size_t | bc_len |
| struct snobol_pattern * | pattern |
| Optional owning pattern (NULL for stateless searches). Used as the attachment point for the cached Tier-5 trie (pattern->trie_cache) so repeated searches of the same pattern reuse the prebuilt trie instead of rebuilding it each call. | |
| const snobol_range_meta_t * | range_meta |
| Cached charclass range metadata (set_id -> range data). Built at compile time; index is set_id - 1. May be NULL if the pattern has no charclass ops or was created via raw bytecode. | |
| size_t | range_meta_count |
| const char * | s |
| size_t | len |
| size_t | ip |
| size_t | pos |
| size_t | cap_start [MAX_CAPS] |
| size_t | cap_end [MAX_CAPS] |
| size_t | var_start [MAX_VARS] |
| size_t | var_end [MAX_VARS] |
| size_t | var_count |
| uint32_t | counters [MAX_LOOPS] |
| uint32_t | loop_min [MAX_LOOPS] |
| uint32_t | loop_max [MAX_LOOPS] |
| size_t | loop_last_pos [MAX_LOOPS] |
| bool | loop_span_greedy [MAX_LOOPS] |
| uint8_t | max_cap_used |
| uint8_t | max_counter_used |
| snobol_buf * | out |
| void * | pike_thread_buf |
| void * | pike_defer_buf |
| void * | pike_cold_pool |
| struct simd_nfa * | simd_nfa |
| struct snobol_auto_trie_t * | trie_cache |
| emit_cb | emit_fn |
| void * | emit_udata |
| ChoiceArena * | choices_arena |
| size_t | choices_top |
| bool | use_compact_choice |
| void * | choices |
| size_t | choices_cap |
| size_t | choice_allocated |
| size_t | choice_push_count |
| size_t | choice_peak_depth |
| size_t | choice_peak_memory |
| size_t | choice_live_depth |
| UndoRecord * | trail |
| size_t | trail_cap |
| size_t | trail_top |
| WriteLogEntry * | write_log |
| size_t | write_log_cap |
| size_t | write_log_next |
| uint64_t | write_log_bitmap |
| size_t | write_log_compressed_count |
| bool | write_log_dirty |
| bool(* | eval_fn )(int fn_id, const char *s, size_t start, size_t end, void *udata) |
| void * | eval_udata |
| uint16_t * | label_offsets |
| size_t | label_count |
| size_t | label_capacity |
| uint16_t | current_label |
| bool | in_goto_fail |
| bool | abort_flag |
| bool | keep_choices |
| dynamic_pattern_cache_t * | dyn_cache |
| snobol_table_t ** | tables |
| size_t | table_count |
| size_t | table_capacity |
| snobol_array_t ** | arrays |
| size_t | array_count |
| size_t | array_capacity |
| char * | dyn_pending_source |
| size_t | dyn_pending_source_len |
| uint8_t * | dyn_pending_bc |
| size_t | dyn_pending_bc_len |
VM state: all mutable state for a single pattern execution.
Callers initialise the bc, bc_len, s, len fields and any desired callbacks, then call vm_exec() or vm_run(). All heap allocations within the struct are managed by vm_push_choice(), vm_pop_choice(), vm_write_log_init(), and the buffer helpers.
| snobol_array_t** VM::arrays |
| ChoiceArena* VM::choices_arena |
| dynamic_pattern_cache_t* VM::dyn_cache |
| bool(* VM::eval_fn) (int fn_id, const char *s, size_t start, size_t end, void *udata) |
| snobol_buf* VM::out |
| struct snobol_pattern* VM::pattern |
| const snobol_range_meta_t* VM::range_meta |
| size_t VM::range_meta_count |
| snobol_table_t** VM::tables |
| UndoRecord* VM::trail |
| struct snobol_auto_trie_t* VM::trie_cache |
| WriteLogEntry* VM::write_log |