Rustine Documentation

High-performance Gel syntax parser — a Rust rewrite of Python Gelatin, exposed as a native Python module via PyO3 + maturin.

Quick Start

pip install rustine
from Rustine import rustine

grammar = r"""
define nl /\r?\n/
define ws /\s+/

grammar input:
    match 'Name:' ws /[^\r\n,]+/ /(?:\r?\n|,) */:
        out.open('user')
        out.add_attribute('.', 'name', '$2')
"""

print(rustine.parse_to_json(grammar, "Name: Alice\n"))

Contents