kschiess / parslet

A small PEG based parser library. See the Hacking page in the Wiki as well.
kschiess.github.com/parslet
MIT License
809 stars 95 forks source link

Add a 'finished' atom #148

Closed sheldon-b closed 8 years ago

sheldon-b commented 8 years ago

The Finished atom consumes the remainder of the input and always succeeds.

sheldon-b commented 8 years ago

The Travis build seems to be broken since flexmock requires Ruby >=2.0

kschiess commented 8 years ago

Would setting prefix: true in the #parse-call not also work?

https://github.com/kschiess/parslet/blob/master/lib/parslet/atoms/base.rb#L14-L25

sheldon-b commented 8 years ago

Ah, you're right. That works very well, thanks. I didn't see examples using that and didn't quite understand the comments.