parser

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package parser creates sequences from tokens

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 - Contain token that is currently analyzed by parser and the next one. Lexer is used to tokenize the client text input.

func New

func New(lexer *lexer.Lexer) *Parser

New - Return new Parser struct

func (*Parser) ParseSequence

func (parser *Parser) ParseSequence() *ast.Sequence

ParseSequence - Return ast.Sequence (sequence of commands) created from client input after tokenization

Parse tokens returned by lexer to structures defines in ast package, and it's responsible for syntax validation.

Jump to

Keyboard shortcuts

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