Re: Spirit-X3 | Boost 1.59 | Compilation never finishes for a recursive grammar
Larry Evans <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 04/23/2017 09:38 AM, Arun Muralidharan wrote:
> Thanks for the detailed information Larry.
>
> So, I guess I am lucky to do what ever I am doing as a side project instead
> of directly doing it for my job.
>
> @Sehe, can you shed some light on how the patch by Larry can be propagated
> to the mainline ? If there are any more tests to be done, I would be happy
> to do it.
>
> Thanks.
>
You're welcome.
I've tried to isolate the reason why the code fails. See if the
following change doesn't avoid the problem:
//#define AS_WITH_ID
auto as = [](auto p)
{
#ifdef AS_WITH_ID
return x3::rule<struct _>{} = as_parser(p);
#else
return p;
#endif
};
In a much simplified version of your code, when this is run, compilation
succeeds; however, when defined(AS_WITH_ID), then the compilation does
*not* finish after 5 seconds.
HTH.
-regards,
Larry
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot