internal #
Raised by the Go engine only — the TypeScript runtime has no counterpart.
This code means two different things depending on where
you read it. Both are below. Which one you have is settled by the shape
of what you are holding: a parse diagnostic carries row, col and ruleStack; a C ABI
reply is a JSON document whose top level is {"ok":false,"error":{…}}. They are not related events
and share only a name.
Message #
internal error: {src} Hint #
The parser failed unexpectedly; this is a bug in tabnas
or a plugin, not in your input. {placeholders} are filled from the failing token and
the details the grammar attached. The wording is informative and can
change between releases — the code is the contract.
This one is guaranteed by the Go runtime only: the TypeScript engine has no equivalent, so a cross-runtime check must not expect it.
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":"internal","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 #
-
Read the rest of the diagnostic:
row/colpoint at the input,expectedlists the tokens that would have matched, andruleStackshows how the parser got there. -
Reproduce it on its own with
tabnas diagnose --json, which prints the whole object. -
Work the grammar back from the failing alternate — the
debug-parseskill is that procedure written out, and the errors guide covers raising good ones from your own grammar.
-
First settle which
internalyou have — the steps above are for the diagnostic; these are for the library reply. -
Check the
messagebeside the code: unlike a parse diagnostic it is not templated, and for a call-level failure it usually names the argument at fault. -
Confirm the call shape against
tabnas.h. Lengths are explicit byte counts and buffers are not read as NUL-terminated strings; every returnedchar*must be released withtabnas_free, and every handle withtabnas_grammar_free. - 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 engine's error registry , and from the clib block of each descriptor that carries one. Engine 0.8.10.