Go API Reference
The reference of the public Go API, generated from the source of this version of ZeroParse. The reference of released versions is also on pkg.go.dev.
| Package | Synopsis |
|---|---|
github.com/ornew/zeroparse | Package zp is the public API of the ZeroParse parser framework. |
github.com/ornew/zeroparse/grammar | Package grammar defines the abstract syntax tree (AST) of ZeroParse grammars. |
github.com/ornew/zeroparse/runtime | Package runtime is the runtime of parsers generated by zp gen. |
github.com/ornew/zeroparse/gen | Package gen generates the source code of parsers from ZeroParse grammars: Go packages and TypeScript modules. |
github.com/ornew/zeroparse/lint | Package lint reports likely mistakes in ZeroParse grammars: rules and alternatives that can never match, expressions that have no effect, captures that are never read, and grammar shapes that defeat incremental parsing. |
github.com/ornew/zeroparse/schema | Package schema describes the values a grammar can produce, independently of a parse: the output schema that zp.Parser.OutputSchema exports, its JSON form and its validation, and Compare, which reports how two schemas differ. |
github.com/ornew/zeroparse/query | Package query matches structural patterns against parse results. |
github.com/ornew/zeroparse/sample | Package sample generates inputs that a grammar accepts, for testing code that consumes parse results and for seeding fuzz tests. |
github.com/ornew/zeroparse/editfuzz | Package editfuzz checks incremental parsing with a grammar against fresh parses by applying sequences of edits to a zp.Document, and saves a failing sequence as a file that replays it exactly. |
For the command-line tool, see the CLI Reference.