Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInsufficient = errors.New("insufficient input")
ErrInsufficient represents an error which is raised when the given input is insufficient for a term.
Functions ¶
func IsExtendedGraphic ¶
IsExtendedGraphic checks if the rune is a graphic token, comma, or semicolon.
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer turns bytes into tokens.
type TokenKind ¶
type TokenKind byte
TokenKind is a type of Token.
const ( // TokenEOS represents an end of token stream. TokenEOS TokenKind = iota // TokenVariable represents a variable token. TokenVariable // TokenFloat represents a floating-point token. TokenFloat // TokenInteger represents an integer token. TokenInteger // TokenAtom represents an atom token. TokenAtom // TokenComma represents a comma. TokenComma // TokenPeriod represents a period. TokenPeriod // TokenBar represents a bar. TokenBar // TokenParenL represents an open parenthesis. TokenParenL // TokenParenR represents a close parenthesis. TokenParenR // TokenBracketL represents an open bracket. TokenBracketL // TokenBracketR represents a close bracket. TokenBracketR // TokenBraceL represents an open brace. TokenBraceL // TokenBraceR represents a close brace. TokenBraceR )
type UnexpectedRuneError ¶
type UnexpectedRuneError struct {
// contains filtered or unexported fields
}
UnexpectedRuneError represents an error which is raised when the given input contains an unexpected rune.
func (UnexpectedRuneError) Error ¶
func (e UnexpectedRuneError) Error() string
Click to show internal directories.
Click to hide internal directories.