/// ------------------------------------------------------------------------------------
        private PatternGroup CreateOuterMostPatternGroup(string pattern)
        {
            //foreach (var grp in _tokenGroups.Values.OfType<PatternGroup>().Where(g => g.Members.Count == 1))
            //    grp.GroupType = GroupType.Sequential;

            var group = new PatternGroup(_currEnvType)
            {
                GroupType = GroupType.Sequential
            };
            PatternGroupMember member = null;

            foreach (char chr in pattern)
            {
                if (chr == '+')
                {
                    if (member != null)
                    {
                        group.AddRangeOfMembers(member.CloseMember() ?? new[] { member });
                        member = null;
                    }

                    group.AddMember(new PatternGroupMember("+"));
                }
                else if (chr < kMinToken)
                {
                    (member ?? (member = new PatternGroupMember())).AddToMember(chr);
                }
                else
                {
                    if (member != null)
                    {
                        group.AddRangeOfMembers(member.CloseMember() ?? new[] { member });
                        member = null;
                    }

                    group.AddMember(_tokenGroups[chr]);
                }
            }

            if (member != null)
            {
                group.AddRangeOfMembers(member.CloseMember() ?? new[] { member });
            }

            if (group.Members.Count == 1 && group.Members[0] is PatternGroup)
            {
                group = (PatternGroup)group.Members[0];
            }

            //if (group.Members.Count == 1 && group.Members[0] is PatternGroupMember)
            //    group.GroupType = GroupType.Sequential;

            return(group);
        }