Re: skipper does not work
Seth <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 19-10-16 16:59, Jens Kallup wrote:
> But when i have only have comments in buffer/file stream,
> the skipper fails and I get error.
Of course. Your grammar fails for "no content". If empty content is ok,
change the grammar.
Note that in this exact case you would have saved everyone time by
letting your self-contained sample SHOW that you want to parse "only
comments" with success.
E.g. Failing testcase
<http://coliru.stacked-crooked.com/a/e2e72142cfcbe071>
Or perhaps even with debug enabled
<http://coliru.stacked-crooked.com/a/b8303e7d827d7531>
In which case the simplest thing that makes the test pass would be to
replace the grammar with `qi::eps`, but I suppose this could be closer
to what you expect:
run_app = - symbol;
Make the symbol optional, so that if you don't parse one, it doesn't
fail: http://coliru.stacked-crooked.com/a/1518a0e0d5adde23
Output
Parsing SUCCESS.
Parsing SUCCESS.
Parsing SUCCESS.
Parsing SUCCESS.
Parsing SUCCESS.
Parsing SUCCESS.
Parsing SUCCESS.
Parsing SUCCESS.
Parsing SUCCESS.
Parsing SUCCESS.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general