partition

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser represents a parser.

func NewParser

func NewParser(r io.Reader) *Parser

NewParser returns a new instance of Parser.

func (*Parser) Parse

func (p *Parser) Parse(alignmentLength int) (partitionSet *align.PartitionSet, err error)

Parse parses a partition file

type Scanner

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

Scanner represents a lexical scanner.

func NewScanner

func NewScanner(r io.Reader) *Scanner

NewScanner returns a new instance of Scanner.

func (*Scanner) Scan

func (s *Scanner) Scan() (tok Token, lit string)

Scan returns the next token and literal value.

type Token

type Token int64
const (
	ILLEGAL    Token = iota
	IDENTIFIER       // Identifier of model or partition
	SEPARATOR        // field separator : ,
	EQUAL            // Separator between model name and definition
	RANGE            // When defining a range ex 1-500
	MODULO           // Take one site every x sites: '/'
	DECIMAL          // Decimal
	ENDOFLINE        // End of line token
	EOF              // End of File
)

Jump to

Keyboard shortcuts

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