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
|
e1534f678e
|
Simplified calculator 2 example.
|
2019-05-28 23:51:19 +00:00 |
Maurice Makaay
|
d31d09abf0
|
Added crude loop protection to the parser, which should prevent parsers running in circles (happened to me a few times too).
|
2019-05-28 23:01:23 +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 |