Re: skipper does not work

Seth <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 18-10-16 14:05, Jens Kallup wrote:
> I wonder me, why the skipper don't work to parse comment lines:
>
> && comment
> ** comment
> // comment
> /* block */

I wonder why you wonder. I replied to you 4 days ago, and I explained
exactly what was wrong with the skipper
<http://boost.2283326.n4.nabble.com/spirit-with-application-crash-tp4688869p4688878.html>.

I also note that you made your code not-selfcontained again. If you
don't want to copy the code from an answer (good idea), at least run it
through a side-by-side diff tool. That can save you a lot of time.

Here's your new code, integrated with the minimum fix for the skipper:
http://coliru.stacked-crooked.com/a/5c53f81291c92a67

Relevant tests:

int main() {
    for (std::string const s : {
            //"Hello",
            "Hello && comment\r\nWorld",
            "Hello ** comment\r\nWorld",
            "Hello // comment\r\nWorld",
            "Hello // /* block */World",
            }) {
        parseText(s);
    }
}

Output:

    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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.