items

package
v3.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package items computes the lexical item sets, following

Modern Compiler Design. Second Edition. Grune et al Springer 2012 Section 2.6

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
}

type Set

type Set struct {
	No int

	Transitions []*Transition
	// contains filtered or unexported fields
}

func (*Set) Accept

func (set *Set) Accept(slits *stringset.StringSet) string

Accept returns the token type accepted by the first reduce item in set slits is the set of string literals from the AST

func (*Set) Add

func (set *Set) Add(items ...*item.Item)

func (*Set) Contains

func (set *Set) Contains(item *item.Item) bool

func (*Set) Equals

func (set *Set) Equals(other *Set) bool

func (*Set) Items

func (set *Set) Items() []*item.Item

func (*Set) Len

func (s *Set) Len() int

func (*Set) Less

func (s *Set) Less(i, j int) bool

func (*Set) String

func (set *Set) String() string

func (*Set) Swap

func (s *Set) Swap(i, j int)

type Sets

type Sets struct {
	// contains filtered or unexported fields
}

func New

func New(g *ast.GoGLL) *Sets

func (*Sets) GetExisting

func (sets *Sets) GetExisting(set *Set) *Set

func (*Sets) Len

func (sets *Sets) Len() int

Len returns the number of sets in sets

func (*Sets) Set

func (sets *Sets) Set(i int) *Set

func (*Sets) Sets

func (sets *Sets) Sets() []*Set

type Transition

type Transition struct {
	Event ast.LexBase
	To    *Set
}

Directories

Path Synopsis
Package event implements the events that cause transitions between FSA states.
Package event implements the events that cause transitions between FSA states.

Jump to

Keyboard shortcuts

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