alligopher

package module
v0.0.0-...-23fc895 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

README

alligopher

alligopher Gopher

Build Status GoDoc

Documentation

Overview

Package alligopher is a lexer and parser library for Go.

Index

Constants

This section is empty.

Variables

View Source
var Lexer lexer

Functions

This section is empty.

Types

type Parser

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

func NewParser

func NewParser(grammar interface{}) *Parser

NewParser constructs and returns a new Parser for the given grammar.

func (*Parser) Parse

func (p *Parser) Parse(input string) interface{}

type TokenType

type TokenType struct {
	Rule      func(string) []int
	Transform *func(string) interface{}
}

TokenType is...

type TokenTypes

type TokenTypes map[string]TokenType

TokenTypes is ...

func (TokenTypes) Validate

func (t TokenTypes) Validate()

Validate validates if the token types keys are all uppercase.

Directories

Path Synopsis
internal
tag

Jump to

Keyboard shortcuts

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