From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-05-31 13:05:21
On Thursday 31 May 2001 01:44 pm, you wrote:
> OK. But now I'm wondering whether |= is a good idea. For example:
> ChLit<> a('a');
> ChLit<> b('b');
> Rule<> As_b = b;
> As_b |= a>>A;
> Does the final value of As_b represent the following BNF:
> As_b ::= 'a' As_b | 'b'
> Or the following:
> As_b ::= 'a' 'b' | 'b'
The first one. (E)BNF is declarative, not imperative, so any nonterminal in
the right-hand side of a production should be seen as a pointer or reference
to that nonterminal.
Spirit's syntax & semantics coincide quite nicely with the theory.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk