Exemplo n.º 1
0
        private static void SetupMapCaseCharTables(bool CaseSensitive, BuilderApp.CharMappingMode Mapping)
        {
            short num;

            if (!CaseSensitive)
            {
                short num2 = (short)(NFA.Count - 1);
                for (num = 0; num <= num2; num = (short)(num + 1))
                {
                    NFA[num].CaseClosure();
                }
            }
            if (Mapping == BuilderApp.CharMappingMode.Windows1252)
            {
                short num3 = (short)(NFA.Count - 1);
                for (num = 0; num <= num3; num = (short)(num + 1))
                {
                    NFA[num].MappingClosure(Mapping);
                }
            }
        }
Exemplo n.º 2
0
        public void MappingClosure(BuilderApp.CharMappingMode Mapping)
        {
            int num5 = base.Edges().Count() - 1;

            for (int i = 0; i <= num5; i++)
            {
                NumberSet    setB       = new NumberSet(new int[0]);
                CharacterSet characters = base.Edges()[i].Characters;
                int          num6       = characters.Count() - 1;
                for (int j = 0; j <= num6; j++)
                {
                    int charCode = characters[j];
                    int num3     = UnicodeTable.ToWin1252(charCode);
                    if (charCode != num3)
                    {
                        setB.Add(new int[] { num3 });
                    }
                }
                characters.UnionWith(setB);
                characters = null;
            }
        }