Skip to content

rymis/parse

Repository files navigation

parse is Go implementation of PEG parser.

This is simple Go parser that uses mapping from Go types to PEG language definitions.

Simple example:

type Hello struct {
	Hello string `regexp:"[hH]ello"`
	_     string `literal:","`
	Name  string `regexp:"[a-zA-Z]+"`
}
...
var hello Hello
new_location, err := parse.Parse(&hello, []byte("Hello, user"), nil)

Documentation is here: https://godoc.org/github.com/rymis/parse And user-friendly examples and book are placed here.

Go Report Card

About

PEG (Parsing Expression Grammars) implementation using Go and reflection.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages