PEGO

Go API Reference

The reference of the public Go API, generated from the source of this version of PEGO. The reference of released versions is also on pkg.go.dev.

PackageSynopsis
github.com/ornew/pegoPackage pego is the public API of the PEGO parser framework.
github.com/ornew/pego/grammarPackage grammar defines the abstract syntax tree (AST) of PEGO grammars.
github.com/ornew/pego/runtimePackage runtime is the runtime of parsers generated by pego gen.
github.com/ornew/pego/genPackage gen generates the source code of parsers from PEGO grammars: Go packages and TypeScript modules.
github.com/ornew/pego/lintPackage lint reports likely mistakes in PEGO 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/pego/samplePackage sample generates inputs that a grammar accepts, for testing code that consumes parse results and for seeding fuzz tests.
github.com/ornew/pego/editfuzzPackage editfuzz checks incremental parsing with a grammar against fresh parses by applying sequences of edits to a pego.Document, and saves a failing sequence as a file that replays it exactly.

For the command-line tool, see the CLI Reference.