versifier

package
v0.0.0-...-d070850 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package versifier recognizes internal structure of random (currently text-only) data and allows to generate data of a similar structure (for some very weak definition of "similar").

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlphaNumNode

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

func (*AlphaNumNode) Generate

func (n *AlphaNumNode) Generate(w io.Writer, v *Verse)

func (*AlphaNumNode) Print

func (n *AlphaNumNode) Print(w io.Writer, ident int)

func (*AlphaNumNode) Visit

func (n *AlphaNumNode) Visit(f func(n Node))

type BlockNode

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

func (*BlockNode) Generate

func (n *BlockNode) Generate(w io.Writer, v *Verse)

func (*BlockNode) Print

func (n *BlockNode) Print(w io.Writer, ident int)

func (*BlockNode) Visit

func (n *BlockNode) Visit(f func(n Node))

type BracketNode

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

func (*BracketNode) Generate

func (n *BracketNode) Generate(w io.Writer, v *Verse)

func (*BracketNode) Print

func (n *BracketNode) Print(w io.Writer, ident int)

func (*BracketNode) Visit

func (n *BracketNode) Visit(f func(n Node))

type ControlNode

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

func (*ControlNode) Generate

func (n *ControlNode) Generate(w io.Writer, v *Verse)

func (*ControlNode) Print

func (n *ControlNode) Print(w io.Writer, ident int)

func (*ControlNode) Visit

func (n *ControlNode) Visit(f func(n Node))

type KeyValNode

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

func (*KeyValNode) Generate

func (n *KeyValNode) Generate(w io.Writer, v *Verse)

func (*KeyValNode) Print

func (n *KeyValNode) Print(w io.Writer, ident int)

func (*KeyValNode) Visit

func (n *KeyValNode) Visit(f func(n Node))

type LineNode

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

func (*LineNode) Generate

func (n *LineNode) Generate(w io.Writer, v *Verse)

func (*LineNode) Print

func (n *LineNode) Print(w io.Writer, ident int)

func (*LineNode) Visit

func (n *LineNode) Visit(f func(n Node))

type ListNode

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

func (*ListNode) Generate

func (n *ListNode) Generate(w io.Writer, v *Verse)

func (*ListNode) Print

func (n *ListNode) Print(w io.Writer, ident int)

func (*ListNode) Visit

func (n *ListNode) Visit(f func(n Node))

type Node

type Node interface {
	Visit(f func(Node))
	Print(w io.Writer, ident int)
	Generate(w io.Writer, v *Verse)
}

type NodeSet

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

type NumNode

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

func (*NumNode) Generate

func (n *NumNode) Generate(w io.Writer, v *Verse)

func (*NumNode) Print

func (n *NumNode) Print(w io.Writer, ident int)

func (*NumNode) Visit

func (n *NumNode) Visit(f func(n Node))

type Verse

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

func BuildVerse

func BuildVerse(oldv *Verse, data []byte) *Verse

func (*Verse) Print

func (v *Verse) Print(w io.Writer)

func (*Verse) Rand

func (v *Verse) Rand(n int) int

func (*Verse) RandNode

func (v *Verse) RandNode() Node

func (*Verse) Rhyme

func (v *Verse) Rhyme() []byte

type WsNode

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

func (*WsNode) Generate

func (n *WsNode) Generate(w io.Writer, v *Verse)

func (*WsNode) Print

func (n *WsNode) Print(w io.Writer, ident int)

func (*WsNode) Visit

func (n *WsNode) Visit(f func(n Node))

Jump to

Keyboard shortcuts

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