parser icon indicating copy to clipboard operation
parser copied to clipboard

KISS for rule_id to rule RHS macro

Open cppljevans opened this issue 9 months ago • 1 comments

Zach,

AFAICT the BOOST_PARSER_DEFINE_IMP_macro performs, "essentially" the same purpose as the BOOST_SPIRIT_DEFINE_ macro.

Now, again, AFAICT, the purpose of those macros is to "associate" the rule_id with the rules RHS definition. However, this "association" is performed MUCH more simply by the simplified BOOST_SPIRIT_DEFINE_ macro in combination with the modified out-of-macro definition of parse_rule. which uses the rule_defn specialization defined by the simplified BOOST_SPIRIT_DEFINE_.

Hence, I suggest adopting, with any appropriate adapation, the simpler macro in order to conform to the KISS principal.

cppljevans avatar May 26 '24 02:05 cppljevans