Skip to content

Repository files navigation

parse is Go implementation of PEG parser.

Go Reference

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

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages