Documentation
¶
Overview ¶
Command grammar-coverage measures which productions of the OMG Xtext grammars our test inputs exercise, on input-presence evidence: for every rule, fragment, enum and terminal of KerML.xtext, KerMLExpressions.xtext and SysML.xtext it searches the corpora we already parse for the literals the production requires, and buckets it as evidence, no-evidence or indistinguishable.
The number it reports is an over-approximation. A literal in a corpus file means an input could have driven that production; it does not prove our parser took that path, nor that it handled it correctly. It is not a compliance measure.
It is advisory: nothing in the build or the test suite depends on it, and it only reads the corpora. Provision the grammars with scripts/download-pilot-grammars.sh, then run `go run ./cmd/grammar-coverage`. -baseline refreshes the committed docs/project/grammar-coverage-baseline.json, which carries the counts and the gaps rather than every row. See docs/project/grammar-coverage.md.