the embedded io.Reader. When an error is returned, the read offset and the error are stored. When later on, the same of a higher offset is requested, the error is returned again. This way the code will work for Readers that do not repeatedly return the correct error when calling the Read() method multiple times arter a first error has occurred. Note: I am not sure if there are any Reader implementations that wouldn't return the same error message over and over again, but hardening the parsekit Reader to support this is not hard, so let's just go for it. |
||
---|---|---|
examples | ||
reader | ||
.gitignore | ||
LICENSE | ||
README.md | ||
assertions_test.go | ||
cursor.go | ||
cursor_test.go | ||
error.go | ||
error_test.go | ||
go.mod | ||
go.sum | ||
parseapi.go | ||
parser.go | ||
parser_test.go | ||
tokenapi.go | ||
tokenapi_example_test.go | ||
tokenhandler_test.go | ||
tokenhandlerresult.go | ||
tokenhandlers_builtin.go | ||
tokenhandlers_builtin_test.go | ||
tokenizer.go | ||
tokenizer_test.go | ||
tokenresult_test.go |
README.md
go-parsekit
A toolkit that facilitates writing text parsers, based on a flexible combination of parser/combinator technology and a parser state machine.