示例#1
0
        public void _if()
        {
            int pl2, pl3;

            getLex();
            condition();
            pl2 = tableId.poliz_get_free();
            tableId.poliz_blank();
            tableId.poliz_put_lex(new Lexem(Type_of_lex.POLIZ_FGO));
            block();
            pl3 = tableId.poliz_get_free();
            tableId.poliz_blank();
            tableId.poliz_put_lex(new Lexem(Type_of_lex.POLIZ_GO));
            int hlp = tableId.poliz_get_free();

            tableId.poliz_put_lex(new Lexem(Type_of_lex.POLIZ_LABEL, hlp.ToString()), pl2);
            if (curLex.get_type() == Type_of_lex.LEX_else)
            {
                getLex();
                if (curLex.get_type() == Type_of_lex.LEX_if)
                {
                    _if();
                }
                else
                {
                    block();
                }
                tableId.poliz_put_lex(new Lexem(Type_of_lex.POLIZ_LABEL, tableId.poliz_get_free().ToString()), pl3);
            }
            else
            {
                //tableId.poliz_put_lex(new Lexem(Type_of_lex.POLIZ_LABEL, tableId.poliz_get_free().ToString()), pl3);
                tableId.poliz_delLast2();
                tableId.poliz_put_lex(new Lexem(Type_of_lex.POLIZ_LABEL, (hlp - 2).ToString()), pl2);
            }
        }