Re: Design/structure X3 parser more like Qi parser
TONGARI J <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CANCwVhe6eOTd=TW=Z9odFLqocV4pprncCYsOyZu7MCysZJBzrQ@mail.gmail.com> |
2016-12-20 20:34 GMT+08:00 Larry Evans <[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 > > The Ops parameter shows how to change the character use for > the arithmetic operators somewhat like the main_x3's > make_csv_parser's fieldSep argument. > > That method is not as "clean" as passing a runtime parameter > thru the argument list, but it's close. > > I failed to find documentation for the x3::with; hence, I > couldn't try that. I even tried grepping the source code; > however, all I found was names beginning with with_ but no > x3::with. That was with boost_1_61_0. Do you know where I > could find examples or documentation of x3::with? > https://github.com/boostorg/spirit/blob/develop/test/x3/with.cpp Basically, it allows you to inject some data into the context with a tag. I like your class-based grammar encapsulation, seems you took a step in the right direction. It'd be great if you could integrate it into real X3 codebase not just some workbench ;) ------------------------------------------------------------------------------ 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/intel _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general