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 |
Maurice Makaay
|
2751c78003
|
Got rid of the full On()...etc chains for both code clarity and usability clarity. Working on good examples and shaving the API's accordingly.
|
2019-05-25 22:53:04 +00:00 |
Maurice Makaay
|
bb1e462892
|
Ah, found a good way to document larger examples which need function definitions and such. Let's see if this works in godoc nicely.
|
2019-05-25 14:37:38 +00:00 |
Maurice Makaay
|
8a6815332e
|
Example extended.
|
2019-05-24 23:55:10 +00:00 |
Maurice Makaay
|
e9c618580d
|
Example extended.
|
2019-05-24 23:53:04 +00:00 |
Maurice Makaay
|
723e2a0c38
|
Added complete example for a parser.
|
2019-05-24 23:41:47 +00:00 |
Maurice Makaay
|
070a215ac3
|
More documentation example testing.
|
2019-05-24 21:34:54 +00:00 |
Maurice Makaay
|
3e87e010fb
|
Banged some sense into the constructors. Instead of one convulated parsekit.New(), we now have parsekit.NewParser() and parsekit.NewMatcherWrapper(). ALso playing with adding examples to the documentation.
|
2019-05-24 20:50:31 +00:00 |