itod / pegkit

'Parsing Expression Grammar' toolkit for Cocoa/Objective-C
MIT License
392 stars 37 forks source link

Generic delegate callbacks #35

Open ewanmellor opened 9 years ago

ewanmellor commented 9 years ago

Add a new feature to call parser:willMatch: or parser:didMatch: on the delegate whenever a rule is matched.

This adds a new PKParserDelegate protocol, so that the selectors are declared (though PKParser.init does not require this protocol to be implemented by its parameter, because this whole protocol is optional).

Move the parser:didFailToMatch: declaration to PKParserDelegate, now that we have such a thing.