Go to file
Maurice Makaay 9656cd4449 The parsekit.reader.Reader now caches error messages that are returned from
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.
2019-06-09 19:42:20 +00:00
examples Removed the use of Error.Full(). The default Error() method now includes the extra data from Full() (line and column offset) 2019-06-09 15:20:44 +00:00
reader The parsekit.reader.Reader now caches error messages that are returned from 2019-06-09 19:42:20 +00:00
.gitignore Initial commit 2019-05-21 14:45:32 +00:00
LICENSE Initial commit 2019-05-21 14:45:32 +00:00
README.md Initial import of the parsekit module. 2019-05-21 14:49:44 +00:00
assertions_test.go Merged functionality of p.Expects(string) and p.UnexpectedInput(). 2019-06-07 07:56:24 +00:00
cursor.go Big simplification run once more, cleaned up code, added tests and examples, made stuff unexported where possible, to slim down the exported interface. 2019-06-04 23:15:02 +00:00
cursor_test.go Big simplification run once more, cleaned up code, added tests and examples, made stuff unexported where possible, to slim down the exported interface. 2019-06-04 23:15:02 +00:00
error.go Removed the use of Error.Full(). The default Error() method now includes the extra data from Full() (line and column offset) 2019-06-09 15:20:44 +00:00
error_test.go Removed the use of Error.Full(). The default Error() method now includes the extra data from Full() (line and column offset) 2019-06-09 15:20:44 +00:00
go.mod Moved Reader into its own package. 2019-06-07 10:55:55 +00:00
go.sum Moved Reader into its own package. 2019-06-07 10:55:55 +00:00
parseapi.go In the spirit of Go, slimmed down the ParseAPI interface. I'm no longer using ParseAPI.On(..).<DoSomething>(), but now it's simply ParseAPI.<DoSomething>(). I also dropped the difference between a Stay() and an Accept(). All that is possible now is ParseAPI.Peek() and ParseAPI.Accept(). 2019-06-09 10:25:49 +00:00
parser.go Backup work. 2019-06-08 22:48:56 +00:00
parser_test.go Removed the use of Error.Full(). The default Error() method now includes the extra data from Full() (line and column offset) 2019-06-09 15:20:44 +00:00
tokenapi.go Backup work. 2019-06-08 22:48:56 +00:00
tokenapi_example_test.go Removed the use of Error.Full(). The default Error() method now includes the extra data from Full() (line and column offset) 2019-06-09 15:20:44 +00:00
tokenhandler_test.go Merged functionality of p.Expects(string) and p.UnexpectedInput(). 2019-06-07 07:56:24 +00:00
tokenhandlerresult.go Merged functionality of p.Expects(string) and p.UnexpectedInput(). 2019-06-07 07:56:24 +00:00
tokenhandlers_builtin.go Improvement a few TokanHandlers by letting them make use of the new MatchRuneByCallback method, instead of having them implement their own logic. 2019-06-07 15:57:53 +00:00
tokenhandlers_builtin_test.go In the spirit of Go, slimmed down the ParseAPI interface. I'm no longer using ParseAPI.On(..).<DoSomething>(), but now it's simply ParseAPI.<DoSomething>(). I also dropped the difference between a Stay() and an Accept(). All that is possible now is ParseAPI.Peek() and ParseAPI.Accept(). 2019-06-09 10:25:49 +00:00
tokenizer.go In the spirit of Go, slimmed down the ParseAPI interface. I'm no longer using ParseAPI.On(..).<DoSomething>(), but now it's simply ParseAPI.<DoSomething>(). I also dropped the difference between a Stay() and an Accept(). All that is possible now is ParseAPI.Peek() and ParseAPI.Accept(). 2019-06-09 10:25:49 +00:00
tokenizer_test.go Removed the use of Error.Full(). The default Error() method now includes the extra data from Full() (line and column offset) 2019-06-09 15:20:44 +00:00
tokenresult_test.go Adding documentation and getting the interactions between ParseAPI and TokenAPI cleaned up a bit. 2019-06-07 07:26:41 +00:00

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.