parse

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const UIDLVersion = 1

Variables

This section is empty.

Functions

func JSON

func JSON(input io.Reader, name string) (ui.CommandsDescr, error)

JSON parses JSON from a Reader and gives the content back suitable for validation. An error is returned if the stream can't be unmarshalled or a data type doesn't match. We are rather strict about the JSON standard as this is meant for fast machine to machine communication. Please use UIDL as a human friendly format.

func UIDL

func UIDL(input io.Reader, _ string) (ui.CommandsDescr, error)

func UIDescription

func UIDescription(input io.Reader, name string, format string) (ui.CommandsDescr, error)

UIDescription parses a UI description in the given format and gives the content back suitable for validation. Supported formats are: (H)JSON and UIDL An error is returned if the steam can't be read or unmarshalled or a data type doesn't match.

Types

type AntlrErrorListener

type AntlrErrorListener struct {
	*antlr.DefaultErrorListener
	// contains filtered or unexported fields
}

func NewAntlrErrorListener

func NewAntlrErrorListener() *AntlrErrorListener

func (*AntlrErrorListener) CollectError

func (ael *AntlrErrorListener) CollectError(err error)

func (*AntlrErrorListener) CombinedError

func (ael *AntlrErrorListener) CombinedError() error

func (*AntlrErrorListener) SyntaxError

func (ael *AntlrErrorListener) SyntaxError(
	_ antlr.Recognizer,
	_ interface{},
	line, column int, msg string,
	_ antlr.RecognitionException,
)

SyntaxError stores Go errors with messages of the following format:

line <line>:<column> <message>

type ErrorCollector

type ErrorCollector interface {
	CollectError(error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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