means.base: Shared Constants and Regex Store#

The base subpackage holds the low-level infrastructure shared by the rest of the package: environment-derived constants and filesystem paths in common, and the compiled RGXS regex store in regex, which is re-exported here.

I Regex Store#

RGXS is the package-wide RegexStore (from my-basis) holding every compiled pattern used to parse ledgers, statements, and account paths.

means.base.regex.RGXS#

A powerful regex pattern management system with composition and parsing capabilities.

RegexStore provides a comprehensive framework for defining, composing, and applying complex regex patterns. To do this, it also contains code for analyzing existing patterns, breaking them down into their component parts.

Features:
  • Hierarchical pattern composition from simple building blocks.

  • Recursive pattern references via named groups.

  • Ergonomic group management and subroutine invocation.

  • Automatic parsing of match results into a more ergonomic form (see MatchData).

  • Pattern optimization applied by default.

  • Construction of “Router trees” for efficient matching of long patterns to long texts.

  • A REGEX_TIMEOUT deadline (10s) guarding every public engine call, including substitutions, so runaway backtracking cannot hang unattended processing.

The DSL used to specify patterns can combine a variety of input types into one, including:
  • String literals and pre-compiled patterns.

  • Tuples for group creation with custom separators.

  • Lists for sequential composition of groups.