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.
| Package | Synopsis |
|---|---|
github.com/ornew/pego | Package pego is the public API of the PEGO parser framework. |
github.com/ornew/pego/grammar | Package grammar defines the abstract syntax tree (AST) of PEGO grammars. |
github.com/ornew/pego/runtime | Package runtime is the runtime of parsers generated by pego gen. |
github.com/ornew/pego/gen | Package gen generates the source code of parsers from PEGO grammars: Go packages and TypeScript modules. |
github.com/ornew/pego/lint | Package 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/sample | Package sample generates inputs that a grammar accepts, for testing code that consumes parse results and for seeding fuzz tests. |
github.com/ornew/pego/editfuzz | Package 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.