Re: Design/structure X3 parser more like Qi parser
Larry Evans <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 12/20/2016 07:10 AM, TONGARI J wrote: > 2016-12-20 20:34 GMT+08:00 Larry Evans <[email protected] > <mailto:[email protected]>>: > > I've updated the code to use an Ops template parameter to > the calc1_gram::gram_deriv: > > https://github.com/cppljevans/spirit/blob/ExagonLinkingError/workbench/x3/rule_defns/parse_rule_crtp.cpp#L160 > <https://github.com/cppljevans/spirit/blob/ExagonLinkingError/workbench/x3/rule_defns/parse_rule_crtp.cpp#L160> [snip] > > I like your class-based grammar encapsulation, seems you took a step in > the right direction. Thanks. > It'd be great if you could integrate it into real X3 codebase not just > some workbench ;) > > It's in a fork here: https://github.com/cppljevans/spirit/blob/get_rhs/include/boost/spirit/home/x3/nonterminal/rule.hpp#L237 However, I don't think it allows separate compilation of the definition, which is, IIUC, purpose of BOOST_SPIRIT_INSTANTIATE: https://github.com/cppljevans/spirit/blob/get_rhs/include/boost/spirit/home/x3/nonterminal/rule.hpp#L230 Oh well, I'll see if I can think of a workaround :( 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