libsnobol4 1.0.2
High-performance SNOBOL4-style pattern matching library
Loading...
Searching...
No Matches
snobol_range_meta_t Struct Reference

Cached range metadata for a single charclass set. More...

#include <vm.h>

Public Attributes

const uint8_t * ranges_ptr
uint16_t count
uint16_t case_insensitive
uint64_t ascii_map [2]
bool has_ascii_map

Detailed Description

Cached range metadata for a single charclass set.

Built once at compile time (or state-create time) so that get_ranges_ptr() can resolve set_id to range data via O(1) array lookup instead of re-parsing the bytecode trailer.

Definition at line 60 of file vm.h.

Member Data Documentation

◆ ascii_map

uint64_t snobol_range_meta_t::ascii_map[2]

Precomputed ASCII membership bitmap (bytes 0-127), derived once from ranges_ptr. Valid only when has_ascii_map is set; ranges that exceed the ASCII range (start/end > 127) leave the flag clear and callers fall back to the range walk. Lets the search-VM class ops (BREAKX, SPAN, ANY, NOTANY) test membership with a single bitmap load instead of rebuilding the bitmap per subject byte.

Definition at line 72 of file vm.h.

◆ case_insensitive

uint16_t snobol_range_meta_t::case_insensitive

Non-zero if case-insensitive

Definition at line 63 of file vm.h.

◆ count

uint16_t snobol_range_meta_t::count

Number of CpRange entries

Definition at line 62 of file vm.h.

◆ has_ascii_map

bool snobol_range_meta_t::has_ascii_map

Definition at line 73 of file vm.h.

◆ ranges_ptr

const uint8_t* snobol_range_meta_t::ranges_ptr

Pointer to packed range data in bytecode

Definition at line 61 of file vm.h.


The documentation for this struct was generated from the following file:
  • core/include/snobol/vm.h