Maurice Makaay
|
c0389283bd
|
Added input check for MatchIntegerBetween()
|
2019-06-05 22:21:34 +00:00 |
Maurice Makaay
|
3d791233e0
|
Added a lot of IP-address-related TokenHandlers, so we can now process IPv4 addresses, IPv6 addresses, CIDR netmasks, IPv4 dotted quad netmasks, IPv4Net (ipv4 + mask) and IPv6Mask (ipv6 + mask).
|
2019-06-05 22:16:09 +00:00 |
Maurice Makaay
|
05585db341
|
Normalizing error handling, to always include the caller location in errors. This makes debugging a lot easier for users of the package, because it doesn't say stuff like 'Method() was called incorrectly', but instead something like 'Method() was called incorrectlty at /path/to/file.go:1234'.
|
2019-06-05 10:07:50 +00:00 |
Maurice Makaay
|
75373e5ed5
|
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 |
Maurice Makaay
|
4580962fb8
|
Backup a load of work on typed token support, making it easy to produce tokens directly from parser/combinator-based parsing rules.
|
2019-06-04 00:03:08 +00:00 |
Maurice Makaay
|
21f1aa597c
|
Made the panic() calls (which basically indicate parser implementation bugs) more useful by referencing from where illegal calls were made.
|
2019-05-29 07:24:27 +00:00 |
Maurice Makaay
|
7aff3fc43e
|
Added a nice example that shows how a []string-based type can be turned into a parser that fills its own slice elements during parsing.
|
2019-05-28 14:38:04 +00:00 |
Maurice Makaay
|
2d851103e5
|
Cleanup of stuff that I don't need anymore, because it has been fully deprecated. Also added some tests for panic() calls in parsekit, which brings test coverage to 100%. It's not a goal as such, but it's good to know that I got there without cheaty tests :)
|
2019-05-28 13:41:58 +00:00 |
Maurice Makaay
|
3dfa99c965
|
Modified all examples and tests to make use of the new ideas on how to keep parsing state. After this commit, I can cleanup a lot of stuff from the emitting loop-based parser which was basically crap for complex parsers.
|
2019-05-28 10:42:46 +00:00 |
Maurice Makaay
|
41f8733e99
|
Pfff, okay, so today I found a rather nice way of writing a parser that can hold some internal state, while stell holding on to the basic principle of having a function signature the applies to every parse handler in the system. By using methods instead of stand-alone functions, it is possible to let the accompanying struct hold on to the required state. Implemented this principle for the two calculator example projects. The rest is quite broken now, sorry :-p
|
2019-05-27 23:24:07 +00:00 |
Maurice Makaay
|
c6fde2cf4e
|
A big round of getting-ya-terminology-straight.
|
2019-05-26 09:25:34 +00:00 |