generator

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 12 Imported by: 0

README

This is compiler of lexer configuration file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(r *bufio.Reader, pkgName string, outfile string)

Types

type LexerTemplate

type LexerTemplate struct {
	PackageName          string
	EmbeddedTmpl         string
	StateIDToRegexIDTmpl string
	FinStatesTmpl        string
	TransitionTableTmpl  string
	RegexActionsTmpl     string
	UserCodeTmpl         string
}

type Parser

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

func NewParser

func NewParser(r *bufio.Reader) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (def string, rules [][]string, userCode string)

func (*Parser) Split

func (p *Parser) Split() (def string, rules string, userCode string)

Jump to

Keyboard shortcuts

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