lexer

package
v0.0.0-...-97928f7 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	//XItemError is an error with the parser input
	XItemError XItemType = "Error"
	//XItemAbsLocPath is an absolute path
	XItemAbsLocPath = "Absolute path"
	//XItemAbbrAbsLocPath represents an abbreviated absolute path
	XItemAbbrAbsLocPath = "Abbreviated absolute path"
	//XItemAbbrRelLocPath marks the start of a path expression
	XItemAbbrRelLocPath = "Abbreviated relative path"
	//XItemRelLocPath represents a relative location path
	XItemRelLocPath = "Relative path"
	//XItemEndPath marks the end of a path
	XItemEndPath = "End path instruction"
	//XItemAxis marks an axis specifier of a path
	XItemAxis = "Axis"
	//XItemAbbrAxis marks an abbreviated axis specifier (just @ at this point)
	XItemAbbrAxis = "Abbreviated attribute axis"
	//XItemNCName marks a namespace name in a node test
	XItemNCName = "Namespace"
	//XItemQName marks the local name in an a node test
	XItemQName = "Local name"
	//XItemNodeType marks a node type in a node test
	XItemNodeType = "Node type"
	//XItemProcLit marks a processing-instruction literal
	XItemProcLit = "processing-instruction"
	//XItemFunction marks a function call
	XItemFunction = "function"
	//XItemArgument marks a function argument
	XItemArgument = "function argument"
	//XItemEndFunction marks the end of a function
	XItemEndFunction = "end of function"
	//XItemPredicate marks a predicate in an axis
	XItemPredicate = "predicate"
	//XItemEndPredicate marks a predicate in an axis
	XItemEndPredicate = "end of predicate"
	//XItemStrLit marks a string literal
	XItemStrLit = "string literal"
	//XItemNumLit marks a numeric literal
	XItemNumLit = "numeric literal"
	//XItemOperator marks an operator
	XItemOperator = "operator"
	//XItemVariable marks a variable reference
	XItemVariable = "variable"
)

Variables

This section is empty.

Functions

func Lex

func Lex(xpath string) chan XItem

Lex an XPath expresion on the io.Reader

Types

type Lexer

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

Lexer lexes out XPath expressions

type XItem

type XItem struct {
	Typ XItemType
	Val string
}

XItem is the token emitted from the parser

type XItemType

type XItemType string

XItemType is the parser token types

Jump to

Keyboard shortcuts

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