utils

package
v0.0.0-...-8f6eac0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EndLineSymbol  = "⊣"
	EndStackSymbol = "∆"
	EpsilonSymbol  = "ε"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule struct {
	Number    int    `json:"-"`
	Left      string `json:"left"`
	Right     string `json:"right"`
	IsEpsylon bool
}

type RulesJSON

type RulesJSON struct {
	Rules []Rule `json:"rules"`
}

type RulesTable

type RulesTable struct {
	Mapped      map[int]Rule
	Ordered     []Rule
	LeftMapped  map[string][]Rule
	RightMapped map[string][]Rule
	Size        int
}

func NewRulesTable

func NewRulesTable() RulesTable

NewRulesTable представляет таблицу правил

func (*RulesTable) AddRule

func (rt *RulesTable) AddRule(left string, right string)

func (*RulesTable) CanBeEpsylon

func (rt *RulesTable) CanBeEpsylon(str string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳