icvcn

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RankToStr = map[Rank]string{
	Realm:      "Realm",
	Subrealm:   "Subrealm",
	Kingdom:    "Kingdom",
	Subkingdom: "Subkingdom",
	Phylum:     "Phylum",
	Subphylum:  "Subphylum",
	Class:      "Class",
	Subclass:   "Subclass",
	Order:      "Order",
	Suborder:   "Suborder",
	Family:     "Family",
	Subfamily:  "Subfamily",
	Genus:      "Genus",
	Species:    "Species",
}

Functions

func Pretty

func Pretty(pretty bool) func(*Parser) error

func Size

func Size(size int) func(*Parser) error

Types

type Parsed

type Parsed struct {
	Code          nomcode.Code
	Input         string
	Rank          Rank
	Uninomial     string
	Genus         string
	Species       string
	Words         []parsed.Word
	Error         error
	Parsed        bool
	ParserVersion string
}

func Parse

func Parse(inp string) *Parsed

func (*Parsed) ToOutput

func (p *Parsed) ToOutput(withDetails, _ bool) parsed.Parsed

type Parser

type Parser struct {
	Buffer string

	Pretty bool
	// contains filtered or unexported fields
}

func (*Parser) AST

func (t *Parser) AST() *node32

func (*Parser) Add

func (t *Parser) Add(rule pegRule, begin, end, index uint32)

func (*Parser) Init

func (p *Parser) Init(options ...func(*Parser) error) error

func (*Parser) Parse

func (p *Parser) Parse(rule ...int) error

func (*Parser) ParseToStruct

func (p *Parser) ParseToStruct() Parsed

ParseToStruct parses the input and returns a ParsedICVCN structure. If parsing fails, the Error field will contain the error and Parsed will be false.

func (*Parser) PrettyPrintSyntaxTree

func (t *Parser) PrettyPrintSyntaxTree(buffer string)

func (*Parser) Print

func (t *Parser) Print()

func (*Parser) PrintSyntaxTree

func (p *Parser) PrintSyntaxTree()

func (*Parser) Reset

func (p *Parser) Reset()

func (*Parser) SprintSyntaxTree

func (p *Parser) SprintSyntaxTree() string

func (*Parser) Tokens

func (t *Parser) Tokens() []token32

func (*Parser) Trim

func (t *Parser) Trim(length uint32)

func (*Parser) WriteSyntaxTree

func (p *Parser) WriteSyntaxTree(w io.Writer)

type Rank

type Rank int
const (
	UnknownRank Rank = iota
	Realm
	Subrealm
	Kingdom
	Subkingdom
	Phylum
	Subphylum
	Class
	Subclass
	Order
	Suborder
	Family
	Subfamily
	Genus
	Species
)

func (Rank) String

func (r Rank) String() string

Jump to

Keyboard shortcuts

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