lexer

package
v0.0.0-...-2c802aa Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package lexer implements lexer for a simple regular expression.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

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

Lexer has a slice of symbols to analyze.

func NewLexer

func NewLexer(s string) *Lexer

NewLexer returns a new Lexer. This constructor create a sequence of symbols from the string given in the argument and hold it.

func (*Lexer) Scan

func (l *Lexer) Scan() (tokenList []*token.Token)

Scan returns the token list to which converted from the symbol slice held in Lexer struct.

Jump to

Keyboard shortcuts

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