utilities

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const Eof rune = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type CharReferenceInterval

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

Represents a character interval that keeps a reference. This class is internal and used by CharacterReferenceMap.

func NewCharReferenceInterval

func NewCharReferenceInterval(start rune, end rune, reference interface{}) *CharReferenceInterval

func (*CharReferenceInterval) End

func (c *CharReferenceInterval) End() rune

func (*CharReferenceInterval) InRange

func (c *CharReferenceInterval) InRange(symbol rune) bool

func (*CharReferenceInterval) Reference

func (c *CharReferenceInterval) Reference() interface{}

func (*CharReferenceInterval) Start

func (c *CharReferenceInterval) Start() rune

type CharReferenceMap

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

This class keeps references associated with specific characters

func NewCharReferenceMap

func NewCharReferenceMap() *CharReferenceMap

func (*CharReferenceMap) AddDefaultInterval

func (c *CharReferenceMap) AddDefaultInterval(reference interface{})

func (*CharReferenceMap) AddInterval

func (c *CharReferenceMap) AddInterval(start rune, end rune, reference interface{})

func (*CharReferenceMap) Clear

func (c *CharReferenceMap) Clear()

func (*CharReferenceMap) Lookup

func (c *CharReferenceMap) Lookup(symbol rune) interface{}

type TCharValidator

type TCharValidator struct {
}

Validates characters that are processed by Tokenizers.

var CharValidator *TCharValidator = &TCharValidator{}

func (*TCharValidator) IsDigit

func (c *TCharValidator) IsDigit(value rune) bool

func (*TCharValidator) IsEof

func (c *TCharValidator) IsEof(value rune) bool

func (*TCharValidator) IsEol

func (c *TCharValidator) IsEol(value rune) bool

Jump to

Keyboard shortcuts

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