Abraham.DLXChecker.Data C# (CSharp) Method

Data() private method

private Data ( ) : void
return void
        private void Data()
        {
            run_to_text = false;
            run_to_data_content = false;
            try
            {
                DFirst();//首先保证第一行代码是.data
            }
            catch
            {
                jump_to_next_line();
            }

            skip_space();
            if (!(cur_token == '\r' || cur_token == '\n' || cur_token == ';' || cur_token=='\0'))
                error(string.Format(".data伪指令结束后出现不支持的符号{0}", cur_token));

            while (cur_token != 0 && !run_to_text)
            {
                switch (cur_token)
                {
                    case ';':
                        C();
                        continue;
                    case ' ':
                    case '\t':
                        skip_space();
                        continue;
                    case '\n':
                        AppendContent();
                        get_src_token();
                        continue;
                    case '\r':
                        get_src_token();//ignore '\r', as each sentence end with "\n\r" in windows
                        continue;
                    default:
                        try
                        {
                            DP();//数据段伪指令
                            skip_space();
                            if (cur_token == '\r' || cur_token == '\n' ||  cur_token == ';')
                                break;
                            else
                                error(string.Format("当前伪指令结束后出现不支持的符号{0}", cur_token));
                            break;
                        }
                        catch
                        {
                            jump_to_next_line();
                            break;
                        }

                }
            }
            if (cur_token == 0)
                if (format_line.Length > 0 || src_line.Length > 0)
                    AppendContent();

            if (!run_to_text)
            {
                error("没有找到程序段!");
            }

            //检查是否有声明但没有定义的global标记
            if (global_symbol_tmp.Count > 0)
            {
                foreach (KeyValuePair<string, row_colum> kvp in global_symbol_tmp)
                {
                    try
                    {
                        error(string.Format("global声明的标记{0}没有定义", kvp.Key), kvp.Value.row, kvp.Value.colum);
                    }
                    catch (DLXException)
                    {
                    }
                }

            }
        }