Ejemplo n.º 1
0
        public void lookupAction(int q_state, int q_token)
        {
            SSYaccTableRowEntry entry = this.m_table.lookupRow(q_state).lookupAction(q_token);

            if (entry == null)
            {
                this.m_action = 1;
            }
            else
            {
                switch ((this.m_action = entry.action()))
                {
                case 0:
                    this.m_state = entry.entry();
                    return;

                case 1:
                case 3:
                    break;

                case 2:
                {
                    SSYaccTableProd prod = this.m_table.lookupProd(entry.entry());
                    this.m_production     = entry.entry();
                    this.m_leftside       = prod.leftside();
                    this.m_productionSize = prod.size();
                    return;
                }

                case 4:
                    this.m_lexSubtable = this.m_table.larTable(entry.entry());
                    break;

                default:
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        public SSLexFinalState lookupFinal(int q_state)
        {
            SSLexSubtable subtable = (SSLexSubtable)this.m_stack.Peek();

            return(subtable.lookupFinal(q_state));
        }
Ejemplo n.º 3
0
        public int lookup(int q_state, int q_next)
        {
            SSLexSubtable subtable = (SSLexSubtable)this.m_stack.Peek();

            return(subtable.lookup(q_state, q_next));
        }