chappi-syntax 0.1.0

Canonical S-expression parser and serializer for the Chappi cognitive-state language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# chappi-syntax

`chappi-syntax` provides Chappi v1's span-carrying generic S-expression parser,
deterministic canonical serializer, and canonical SHA-256 hashing.

The parser accepts at most 256 nested lists and reports structured diagnostics
for invalid input. Canonical output is UTF-8, NFC-normalized, LF-only, ordered,
and, for a non-empty `Document`, terminated by exactly one newline. An empty
`Document` canonicalizes to empty bytes. Valid snapshots contain a header, so
their canonical output is always non-empty and newline-terminated.

The public API includes `parse_document`, `canonicalize`, `canonical_hash`,
`Document`, `Form`, `Atom`, `Span`, and `Diagnostic`. API documentation is
available on [docs.rs](https://docs.rs/chappi-syntax/0.1.0/).

Chappi stores explicit resumable semantic state; it is not a format for hidden
chain-of-thought.