parser

package
v0.0.0-...-1c64d69 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnmatchedRBrace   = errors.New("unmatched '}'")
	ErrUnmatchedLBrace   = errors.New("unmatched '{'")
	ErrUnexpectedEOF     = errors.New("unexpected EOF")
	ErrUnexpectedNewline = errors.New("unexpected newline")
)

Functions

This section is empty.

Types

type NexProgram

type NexProgram struct {
	Id         int
	Regex      string
	StartCode  string
	EndCode    string
	UserCode   string
	Children   []*NexProgram
	NFA        []*graph.Node
	DFA        []*graph.Node
	Parameters []Parameter
}

func ParseNex

func ParseNex(in io.Reader) (*NexProgram, error)

func (*NexProgram) GetId

func (r *NexProgram) GetId() int

func (*NexProgram) GetRegex

func (r *NexProgram) GetRegex() string

func (*NexProgram) WriteDFADotGraph

func (r *NexProgram) WriteDFADotGraph(writer io.Writer) error

func (*NexProgram) WriteNFADotGraph

func (r *NexProgram) WriteNFADotGraph(writer io.Writer) error

type Parameter

type Parameter struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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