Now let's define the rules for addition, subtraction, multiplication
and division. Here, we can ignore issues of associativity and
precedence -- the C++ compiler will enforce that for us. We only must
enforce that the arguments to the operators must themselves conform
to the CalculatorGrammar that we forward-declared above.
: plus< CalculatorGrammar, CalculatorGrammar >
: minus< CalculatorGrammar, CalculatorGrammar >
So what's the difference between a rule, a pattern, and a metagrammar?
Re: [proto][docs]what's diff between pattern, grammar, rule, metagrammar?
Larry Evans wrote:
> I'm having a hard time understanding the differences between some
That's understandable. I haven't settled on terminology yet, and it
shows. I started calling them patterns, especially when I was only using
them for simple pattern matching. When I started building grammars, I
switched terminology. Joel calls them meta-grammars to differentiate
between Spirit grammars, and I used that term in a few places. And a
rule is a part of a grammar.
Basically, I need to go through the docs and replace "pattern" and
"meta-grammars" with "grammar". And it might be nice to have a glossary
of terms somewhere.