atomiser

package module
v0.0.0-...-a394c79 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: JSON Imports: 8 Imported by: 3

README

== About ==
Atomiser reads text comprising s-expressions and breaks it into atoms.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scan

func Scan(s, f any)

Types

type Atomiser

type Atomiser struct {
	*scanner.Scanner
	String Delimiters
	List   Delimiters
	Array  Delimiters
}

func NewAtomiser

func NewAtomiser(f any) (a *Atomiser)

func (Atomiser) DigitValue

func (a Atomiser) DigitValue() (r rune)

func (Atomiser) IsAlpha

func (a Atomiser) IsAlpha() bool

func (Atomiser) IsArrayEnd

func (a Atomiser) IsArrayEnd() bool

func (Atomiser) IsArrayStart

func (a Atomiser) IsArrayStart() bool

func (Atomiser) IsDelimiter

func (a Atomiser) IsDelimiter(d rune) bool

func (Atomiser) IsEOF

func (a Atomiser) IsEOF() bool

func (Atomiser) IsLineBreak

func (a Atomiser) IsLineBreak() bool

func (Atomiser) IsListEnd

func (a Atomiser) IsListEnd() bool

func (Atomiser) IsListStart

func (a Atomiser) IsListStart() bool

func (Atomiser) IsPrint

func (a Atomiser) IsPrint() bool

func (Atomiser) IsRadix

func (a Atomiser) IsRadix(r int) (ok bool)

func (Atomiser) IsStringEnd

func (a Atomiser) IsStringEnd() bool

func (Atomiser) IsStringStart

func (a Atomiser) IsStringStart() bool

func (Atomiser) IsValidSymbol

func (a Atomiser) IsValidSymbol() bool

func (Atomiser) IsWhitespace

func (a Atomiser) IsWhitespace() bool

func (Atomiser) NextToken

func (a Atomiser) NextToken()

func (Atomiser) Read

func (a Atomiser) Read() (r any)

func (*Atomiser) ReadArray

func (a *Atomiser) ReadArray() (s slices.Slice)

func (Atomiser) ReadChar

func (a Atomiser) ReadChar() (r rune)

func (*Atomiser) ReadList

func (a *Atomiser) ReadList() (c *chain.Cell)

func (Atomiser) ReadString

func (a Atomiser) ReadString() (r String)

func (Atomiser) ReadSymbol

func (a Atomiser) ReadSymbol() (r Symbol)

func (Atomiser) SkipWhitespace

func (a Atomiser) SkipWhitespace()

type Delimiters

type Delimiters struct {
	Start, End rune
}

func (Delimiters) IsEnd

func (d Delimiters) IsEnd(v rune) bool

func (Delimiters) IsStart

func (d Delimiters) IsStart(v rune) bool

type Lisper

type Lisper struct {
	*Atomiser
}

func NewLisper

func NewLisper(f any) (l *Lisper)

func (Lisper) ReadDecimalPlaces

func (l Lisper) ReadDecimalPlaces(r int) string

func (Lisper) ReadDigits

func (l Lisper) ReadDigits(radix int) (r string)

func (Lisper) ReadInteger

func (l Lisper) ReadInteger(radix int) int64

func (Lisper) ReadSymbol

func (l Lisper) ReadSymbol() (i any)

type String

type String = string

type Symbol

type Symbol string

Jump to

Keyboard shortcuts

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