Beispiel #1
0
        public bool lookupGoto(int q_state, int q_token)
        {
            SSYaccTableRowEntry entry = this.m_table.lookupRow(q_state).lookupGoto(q_token);

            if (entry == null)
            {
                return(true);
            }
            this.m_state = entry.entry();
            return(false);
        }
Beispiel #2
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;
                }
            }
        }