Re: Parser does not parse
Seth <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 23-11-16 17:37, Jens Kallup wrote: > https://paste.fedoraproject.org/488878/47991796/ > > Lines 441 - 471 You still fail to supply self-contained samples. It still requires Qt (why, please just get rid of it because it has no place in a parser). There's no `main`. There's no sample input. There's no expected results. There's no actual results. In short there's no viable question. > when I remove (symbol_alpha > '=' > int_ | > all will working - or so how I expect it. Ok. > Here a snippet of the code: [snip] Well. Why is that subgrammar repeated 3 times? Also, `>` is an expectation point. As you might have guessed, an expectation point declares a point at which a given parser is _expected_ to match. So `> '='` expects the `=` sign. If not, that's an unexpected error and the parser throws. The exception raised is `qi::expectation_failure<It>`. Quite expected. If you wish to test for an alternative and be able to backtrack, do not use expectation points in your sequence. Instead use the `>>` regular sequence operator. Is this your immediate problem? ------------------------------------------------------------------------------