The only solution I can think of is to have rules that have some generic
catch all as a options...
so...
rule(:a) { a_properly_formed_a | consume_anything_upto_the_next_tag_start }
rule(:consume_anything_upto_the_next_tag_start) { start_tag_token.absent?
>> any }
---
"No man is an island... except Philip"
On Fri, Aug 15, 2014 at 9:22 AM, Ryan Schlesinger <[email protected]>
wrote:
> Is there a simple way to get parslet to be more forgiving in parsing
> unknown tokens?
>
> We’re collaborating on a dmarc record parser that uses parslet and we’ve
> run across a paragraph in the spec that turns our current understanding on
> its head.
> See:&nb sp;https://github.com/trailofbits/dmarc/pull/6
>
> We need to ignore unknown tags and ‘should’ discard syntax errors.
>
>