UpstandingHackers / hammer

Parser combinators for binary formats, in C. Yes, in C. What? Don't look at me like that.
GNU General Public License v2.0
430 stars 40 forks source link

add combinators h_skip, h_seek, h_tell #193

Open pesco opened 4 years ago

pesco commented 4 years ago

Packrat only for now.

Obviously, h_skip could be implemented for regular and CF backends, too. The same probably goes for h_tell because it doesn't actually match anything. It's a fancy h_action on epsilon, basically.

Finally, if one wanted to be perverse, even h_seek can probably be made to work for the other backends. After all, it's just altering the timeline in terms of what input will appear after it... Anyway, that's not what this PR is about. :)