pkg

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineTokenTypes

func DetermineTokenTypes(rules []*Rule) []string

func FindLastTerminal

func FindLastTerminal(symbols []string) string

func FixEnumName

func FixEnumName(name []byte) (string, error)

func FixUnderscores

func FixUnderscores(name []byte, is_terminal bool) (string, error)

Types

type Rule

type Rule struct {
	Lhs  string
	Rhss []string
}

func NewRule

func NewRule(lhs []byte, rhss [][]byte) (*Rule, error)

func Parse

func Parse(data []byte) ([]*Rule, error)

func ParseLine

func ParseLine(line []byte) ([]*Rule, error)

func (Rule) Lines

func (r Rule) Lines() string

func (Rule) String

func (r Rule) String() string

func (Rule) Symbols

func (r Rule) Symbols() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL