builder

package
Version: v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2017 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package builder generates the parser code for a given grammar. It makes no attempt to verify the correctness of the grammar.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildParser

func BuildParser(w io.Writer, g *ast.Grammar, opts ...Option) error

BuildParser builds the PEG parser using the provider grammar. The code is written to the specified w.

Types

type Option

type Option func(*builder) Option

Option is a function that can set an option on the builder. It returns the previous setting as an Option.

func ReceiverName

func ReceiverName(nm string) Option

ReceiverName returns an option that specifies the receiver name to use for the current struct (which is the struct on which all code blocks except the initializer are generated).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL