示例#1
0
        public int param_names()
        {
            int num_param = 0;

            if (curLex.get_type() == Type_of_lex.LEX_closeRoundBracket)
            {
                return(num_param);
            }
            while (true)
            {
                if (curLex.get_type() != Type_of_lex.LEX_id)
                {
                    throw new SystemException(curLex.ToString());
                }
                tableId.addId(curLex);
                num_param++;
                getLex();
                if ((curLex.get_type() != Type_of_lex.LEX_comma) && (curLex.get_type() != Type_of_lex.LEX_closeRoundBracket))
                {
                    throw new SystemException(curLex.ToString());
                }
                else if (curLex.get_type() == Type_of_lex.LEX_comma)
                {
                    getLex();
                }
                else
                {
                    //getLex();
                    break;
                }
            }
            return(num_param);
        }
示例#2
0
        string add_new_uniq_lexId(Type_of_lex type, HtmlElement elem, List <HtmlElement> collect)
        {
            string name = "/hlp_html_var";

            while (tableId.getNumOfLex(name) != -1)
            {
                name += "/";
            }
            tableId.addId(new LexID(new Lexem(type, name), elem, collect));
            return(name);
        }