ebnf

package
v0.0.0-...-8540621 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsedArg

type ParsedArg struct {
	Type *string `parser:"(@Ident \":\")?"`
	Name *string `parser:"(@Ident Whitespace?|Whitespace)?"`
}

ParsedArg represents an arg parsed through ebnf.

type ParsedCmd

type ParsedCmd struct {
	Action *string      `parser:"{@ \"go\" Whitespace? | @ \"run\" Whitespace?}?"`
	Args   []*ParsedArg `parser:"@@*"`
}

ParsedCmd represents a command parsed through ebnf.

func ParseInput

func ParseInput(input string) (*ParsedCmd, error)

ParseInput parses the user input into a command using an ebnf parser.

Jump to

Keyboard shortcuts

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