token

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Init       string = "Init"
	Identifier        = "Identifier"
	GT                = "GT"
	GE                = "GE"
	IntLiteral        = "IntLiteral"
	Float             = "Float"
	Int               = "Int"
	Int1              = "Int1"
	Int2              = "Int2"
	Int3              = "Int3"
	Assignment        = "Assignment"
	Plus              = "Plus"
	Minus             = "Minus"
	Star              = "Star"
	Slash             = "Slash"
	LeftParen         = "LeftParen"
	RightParen        = "RightParen"
	Enter             = "Enter"
)

Variables

This section is empty.

Functions

func InitStatus

func InitStatus(b byte, values []byte) (string, []byte)

InitStatus finite state machine

Types

type TokenType

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

func Tokenize

func Tokenize(str string) []*TokenType

Tokenize Lexical analysis

func (*TokenType) TokenType

func (t *TokenType) TokenType() string

func (*TokenType) Value

func (t *TokenType) Value() string

type Type

type Type string

Jump to

Keyboard shortcuts

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