Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 721 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 721 Bytes

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