Version 1.2 (2026-05-11): (Just bumping version # to sync better with pypi) Version 1.1 (2026-04-01): Added "custom" param to the esrapy Pattern language compiler to allow injection of custom Pattern objects/classes into otherwise compiled Patterns. (E.g., I'm using it to allow me to plug in a custom "guarded string" pattern into a DSL.) Version 1.0 (2026-03-23): Removed compact() code (default visitor provides ~identical functionality). Defaulting compact=False in match() (*** API CHANGE ***) Version 0.8.3 (2026-03-23): Match.visit() now accepts None for the visitor and this falls back to the same behavior as compact(all=False). May strip the compact() path in v1.0 because it's now more or less redundant. (The one exception is the all=True path, which arguably should be handled per-handler in a proper visitor, which can use m directly to inspect alternate parsings.) Version 0.8.2 (2026-03-21): Misc tweaks. Version 0.8.1 (2026-03-16): Revised Sequence single-label passthrough: '_' is now the required label name to trigger passthrough behavior (previously any single label triggered passthrough, with '_' recommended by convention). A single label with any other name now produces a single-entry MetaDict as with multiple labels. This makes intent explicit and avoids ambiguity in visitor dispatch. Revised Match.visit() to apply default structural behavior per pattern type when no handler exists, rather than calling on_default(). Handlers declaring a 'parts' parameter receive the default decomposition automatically as parts=. Added Match.dispatch(visitor, name) for use by visit() and OneOfSet.visit_parts() to perform handler lookup and parts injection, raising KeyError if no handler is found. Added Match.visit_parts(visitor) for use inside handlers that need to trigger or defer the default decomposition explicitly. Added visit_parts(match, visitor) to all Pattern subclasses defining the default structural decomposition for each type. See "Default behavior by pattern type" in the Visitor doc. Labeled OneOfSet alternatives now require an explicit handler; there is no fallback for labeled alternatives. Updated Visitor documentation substantially to reflect the above. Updated PatternSyntax to document the '_' passthrough requirement. Version 0.8 (2026-03-15): Added visitor pattern support for transforming parse trees without using compact(). Call pattern.match(compact=False) to get Match objects directly, then use m.visit(visitor) to dispatch to handler methods by pattern name. See the new "Visitor" doc for details. Added Match.visit(visitor) which dispatches to visitor.on_() based on the matched pattern's name, falling back to on_default(). Anonymous wrapper patterns are traversed transparently. Added Match.children property returning a MatchView, which gives attribute-style access to named children of a Match (c.foo, c.bar) using the sequence labels defined in the grammar. MatchView recurses through anonymous intermediate nodes automatically. Also supports iteration (for child in m.children) and c.get('name', default) for optional children. Added Match.value property returning parsings[0] for convenient access to the string value of terminal/leaf Match objects. Extended OneOfSet alternative labels to support string names as well as integer precedences, with both combinable as "N,name;". visit() uses these labels for dispatch, enabling shared handler names across multiple alternatives (e.g. several precedence levels of binary operators all dispatching to on_binop). Version 0.7 (2023-03-20): Added firstLine parameter to match/parse which improves the error message returned in a SyntaxError exception. Incorporated esrapyIndent which facilitates indentation sensitive syntaxes. In particular added the ">>" operator for specifying indented blocks. Version 0.6.1 (2006-03-25): Added catch of infinite repetitions of nil patterns to the NtoM Pattern. (This catches patterns like * which would otherwise run off allocating an infinite number of interpretations of nothing.) Syntax errors now raise SyntaxError instead of ValueError. Version 0.6 (2006-03-16): Added the special "SPACE" pattern supporting implicit white space. Added a skip expression to the Regex() Pattern (to support SPACE) Updated the examples to use implicit whitespace. Version 0.5 (2006-03-15): Initial release