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 05/02/2017 03:12 PM, Larry Evans wrote:
> 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
Sorry, I should have been more specific. The code here:
https://github.com/cppljevans/spirit/blob/get_rhs/workbench/x3/rec_ex_orig/rec_ex_orig.no_attr.cpp
compiles when !defined(AS_WITH_ID) but fails when defined(AS_WITH_ID).
I'm still trying to understand why :(
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot