Pattern-match terminal | terminal
Brought to you by:
tharwood
Consider the patterns Foo(Bar(void) expression) and Foo(Baz(void) expression) -- these can be naturally factored into Foo(barOrBaz expression) but then the BURM needs a reduction for barOrBaz = Bar(void) and barOrBaz = Baz(void). It would be well to introduce a terminal match that accepted alternates, so the pattern could be Foo( (Bar(void) | Baz(void) ) expression ).
This could also be done for nonterminals, at which point JBurg's grammar would be getting close to LR, but nonterminals are trickier to implement (and to program a specification for) because they have heterogeneous types.