コード例 #1
0
        private static void fixdfa(grammar g, dfa d)
        {
            statePtr s;
            int      j;

            s = new statePtr(d.d_state);
            for (j = 0; j < d.d_nstates; j++, s.inc())
            {
                fixstate(g, s[0]);
            }
        }
コード例 #2
0
        public static void PyGrammar_RemoveAccelerators(grammar g)
        {
            dfaPtr d;
            int    i;

            g.g_accel = 0;
            d         = new dfaPtr(g.g_dfa);
            for (i = g.g_ndfas; --i >= 0; d.inc())
            {
                statePtr s;
                int      j;
                s = new statePtr(d[0].d_state);
                for (j = 0; j < d[0].d_nstates; j++, s.inc())
                {
                    if (null != s[0].s_accel)
                    {
                        PyMem_DEL(ref s[0].s_accel);
                    }
                    s[0].s_accel = null;
                }
            }
        }