Defining recursive rule in local function

Takatoshi Kondo <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <CA+SaqLFH5E=hZ5nASS8UTOrm_Ch_fens6QQ2H3jUdFF7De3_4g@mail.gmail.com>
Hello,

I'm using spirit x3.
When I define a recursive rule, I use BOOST_SPIRIT_DEFINE as following example:
https://github.com/boostorg/spirit/blob/develop/example/x3/calc/calc1.cpp

I want to define a recursive rule in the local function not global or
namespace level. Because I want to capture function local variables to
the rule defined as a lambda expression.

However, BOOST_SPIRIT_DEFINE defines a function template, so I can't
use it in the function.

Is there any good way to define  a recursive rule in the local function?

Thanks,
Takatoshi Kondo

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
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.