ZeroParse

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.

PackageSynopsis
github.com/ornew/zeroparsePackage zp is the public API of the ZeroParse parser framework.
github.com/ornew/zeroparse/grammarPackage grammar defines the abstract syntax tree (AST) of ZeroParse grammars.
github.com/ornew/zeroparse/runtimePackage runtime is the runtime of parsers generated by zp gen.
github.com/ornew/zeroparse/genPackage gen generates the source code of parsers from ZeroParse grammars: Go packages and TypeScript modules.
github.com/ornew/zeroparse/lintPackage 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/schemaPackage 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/queryPackage query matches structural patterns against parse results.
github.com/ornew/zeroparse/samplePackage sample generates inputs that a grammar accepts, for testing code that consumes parse results and for seeding fuzz tests.
github.com/ornew/zeroparse/editfuzzPackage 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.