internal void AddGroup()
{
if (_group.Type() == RegexNode.Testgroup || _group.Type() == RegexNode.Testref)
{
_group.AddChild(_concatenation.ReverseLeft());
if (_group.Type() == RegexNode.Testref && _group.ChildCount() > 2 || _group.ChildCount() > 3)
throw MakeException(SR.TooManyAlternates);
}
else
{
_alternation.AddChild(_concatenation.ReverseLeft());
_group.AddChild(_alternation);
}
_unit = _group;
}