Esempio n. 1
0
 public dfa(int d_type, string d_name, int d_initial, int d_nstates, state[] d_state, string d_first)
 {
     this.d_type    = d_type;
     this.d_name    = d_name;
     this.d_initial = d_initial;
     this.d_nstates = d_nstates;
     this.d_state   = new statePtr(d_state, 0);
     this.d_first   = new bitset(d_first);
 }
Esempio n. 2
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]);
            }
        }
Esempio n. 3
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;
                }
            }
        }
Esempio n. 4
0
 public statePtr(statePtr ptr)
 {
 }