Re: splitted source (decl, def) gives compile errors byy use for test suite
Olaf Peter <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Tom,
> I've had success using the method used in the calc examples:
>
> https://github.com/boostorg/spirit/tree/develop/example/x3/calc/calc7
>
> Have a
> String_literal.hpp
> String_literal_def.hpp
> String_literal.cpp
yes, I use this approach. The problem rise if I want to test each
production in a test suite. calc7 shows:
namespace client {
...
namespace calculator_grammar {
struct expression_class;
typedef x3::rule<expression_class, ast::expression>
expression_type;
BOOST_SPIRIT_DECLARE(expression_type);
}
calculator_grammar::expression_type expression();
}
and expose the top rule, but for testing parts of the grammar a lot of
them are required.
The other question may be behind: How to clever write iterativ the rule
definitions to avoid drowning in compiler errors?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot