itod / pegkit

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

Implement PKParser.isEmptyOK. #24

Open ewanmellor opened 9 years ago

ewanmellor commented 9 years ago

This can be set so that the parser will accept empty input. The parse* methods will return PEGKitSuccessfulEmptyParse in that case.

Note that we need to check that we're actually at the end of the stream, otherwise we're going to accept every bad parse as an empty one.