Пример #1
0
        /// <summary>
        /// Union the set of all characters that may output by this object into the
        /// given set.
        /// </summary>
        ///
        /// <param name="toUnionTo">the set into which to union the output characters</param>
        public virtual void AddReplacementSetTo(UnicodeSet toUnionTo)
        {
            int ch;

            for (int i = 0; i < output.Length; i += IBM.ICU.Text.UTF16.GetCharCount(ch))
            {
                ch = IBM.ICU.Text.UTF16.CharAt(output, i);
                UnicodeReplacer r = data.LookupReplacer(ch);
                if (r == null)
                {
                    toUnionTo.Add(ch);
                }
                else
                {
                    r.AddReplacementSetTo(toUnionTo);
                }
            }
        }
Пример #2
0
 /// <summary>
 /// Union the set of all characters that may be emitted by this rule into the
 /// given set.
 /// </summary>
 ///
 internal void AddTargetSetTo(UnicodeSet toUnionTo)
 {
     output.AddReplacementSetTo(toUnionTo);
 }