
christopher diggins wrote:
I think this does a good job of illustrating the difference between Spirit and YARD. Spirit would require the following code, for the grammar production written above using YARD:
rule<> rule_overall = switch_p [ case_p<'a'>(parser_a), case_p<'b'>(parser_b), case_p<'c'>(parser_b), case_p<'d'>(parser_b), default_p(parser_default) ] ;
With Spirit there is an arbitrary upper bound on the number of case statements, which defaults to 3(!?). I would think that it is safe to say that the YARD parser is easier to use, and has fewer arbitrary constraints *BUT* does not provide dynamic rule expressions, and is more verbose.
What's the problem with the default value? Regards Hartmut