Error reference

grammar

Returned by the C shared libraries. Not a parse diagnostic: it describes the call, not your input.

In the C ABI

Returned by all 19 per-format shared libraries — the ABI is uniform, so every clib can return it.

It arrives as the whole reply, not inside a diagnostic:

{"ok":false,"error":{"code":"grammar","message":"…"}}

This says your call was wrong, not your input. A library that read your input and decided it is outside the format replies {"ok":true,"accept":false} instead — a rejection is an answer, and it carries no code from this namespace. If you are here because a parse "failed", check which of the two you actually got before treating it as an error.

The five-symbol ABI and its guarantees are in tabnas.h; the decision behind it is ADR-12 in the admin repository.

What to do with it

  1. Check the message beside the code: unlike a parse diagnostic it is not templated, and for a call-level failure it usually names the argument at fault.
  2. Confirm the call shape against tabnas.h. Lengths are explicit byte counts and buffers are not read as NUL-terminated strings; every returned char* must be released with tabnas_free, and every handle with tabnas_grammar_free.
  3. If you are writing the binding rather than using one, the four maintained loaders (Rust, Python, JVM, .NET) already implement this contract and are graded against every clib in the fleet.

Generated from the declaring package's tabnas.plugin.json descriptor . Engine 0.8.10.