Back to Explore

fabiospampinato/grammex

GitHub
1 watchersOpen source

Last release: 6 months ago

Grammex is a tiny PEG-like parsing system for building language grammars using regexes. It provides functions to define primitive matches, combine them into rule graphs, then parse input strings (or validate them as a boolean) by checking that rules match the entire input.

Project status

  • The repository (fabiospampinato/grammex) appears actively maintained, with the most recent upstream push on 2025-11-28 and subsequent tagged updates in late 2025.
  • The apparent update cadence is intermittent, with updates clustered in 2025-10 to 2025-11 (v3.1.11 on 2025-10-19, v3.1.12 on 2025-11-28), and a longer gap before that (v3.1.10 on 2025-02-17).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v3.1.12

    6 months ago

    Release v3.1.12 contains no provided release notes. The diff shows only TypeScript type-level changes (no runtime logic changes), focused on the `and` and `or` rule combinators and a new exported `MappedRule` type.

  • v3.1.11

    7 months ago

    v3.1.11 contains TypeScript type system changes centered around how rule builder handlers are typed. The runtime logic appears unchanged (the diff only adds generics and introduces a couple of type casts), but the public TypeScript surface area for handler return types is modified.

  • v3.1.10

    2/17/2025

    Release v3.1.10 was published on 2025-02-17, but no release notes were provided by the publisher. There is no stated information about new features, fixes, breaking changes, security updates, or dependency changes in the available data.

  • v3.1.9

    2/17/2025

    v3.1.9 has no release notes provided, so the documented intent is unknown. The code changes are focused on how the library detects handler arity (nullary vs unary) and, as a result, which regex-matching handler pathway is chosen and what arguments are passed to the handler.

  • v3.1.8

    2/17/2025

    Release v3.1.8 has no publisher release notes provided. The code changes are limited to a small implementation update in src/utils.ts and a package version bump in package.json.

  • v3.1.7

    2/17/2025

    Release v3.1.7 (no release notes provided) makes a small internal refactor of the memoization/caching mechanism used by the parser and validator. Code changes focus on removing parts of the internal State shape and consolidating cache bookkeeping per rule id.

    Breaking
  • v3.1.6

    2/17/2025

    v3.1.6 is a small patch release with 5 files changed. The only core library logic change is in how the parser updates its internal cursor after regex matches, which appears aimed at preventing handler code from interfering with regex lastIndex state.

  • v3.1.5

    2/16/2025

    Release v3.1.5 has no documented release notes, but the code diff shows a behavioral change in how capturing regular expressions are handled. The update introduces a new utility to detect “strictly nullary” functions and uses it to alter the branching logic in the main regex factory.

  • v3.1.4

    2/16/2025

    v3.1.4 introduces substantial internal parsing changes, including a redesigned parser State (new index tracking fields and memoization/backtracking cache queueing) and updated RegExp handling logic. It also changes observable behavior of validate (it no longer suppresses errors), and adds/adjusts logic around how parsing failure indices are computed.

    Breaking
  • v3.1.3

    2/11/2024

    Release v3.1.3 was published on 2024-02-11, but no release notes or change log details were provided by the publisher. As a result, this release cannot be assessed for new features, breaking changes, bug fixes, security updates, or dependency changes from the provided material.