📄 1.txt
字号:
char buf[30003];
int sz=m_cIn.GetWindowText(buf,30000);
buf[sz]=0;
strcpy(m_Compiler.GetTable()-> SourseBuffer,buf);
m_Compiler.CiFaFengXi();
CifaResult * * p=m_Compiler.GetTable()-> LexicalDuad;
int s=0;
int a=p[s]-> type;
while ((p[s]-> type)> =0)
s++;
char (*ep)[100];
ep=m_Compiler.GetTable()-> ErrorMessageTable;
//result to : p,s,ep
m_cOut.SetWindowText( " ");
CString str;
int ErrorCount=0;
str.Format( "输出格式:二元式序列(类型,值)单词\r\n\r\n ");
m_cOut.AppendText(str.GetBuffer(0));
for (int i=0;i <s;i++)
{
if (p[i]-> type> 0)
{
str.Format( "(%d,%d)\t%s\r\n ",p[i]-> type,p[i]-> value,p[i]-> text);
m_cOut.AppendText(str.GetBuffer(0));
}
else
{
ErrorCount++;
if (p[i]-> value==2 && (p[i]-> text[0]> 126 || p[i]-> text[0] <32))
{
str.Format( "错误号:%d %s 【 无法显示该字符! 】\r\n ",
p[i]-> value,ep[p[i]-> value]);
m_cOut.AppendText(str.GetBuffer(0));
}
else
{
str.Format( "错误号:%d %s 【 %s 】\r\n ",
p[i]-> value,ep[p[i]-> value],p[i]-> text);
m_cOut.AppendText(str.GetBuffer(0));
}
}
}
str.Format( "\r\n 发现 %d 个错误!\r\n ",ErrorCount);
m_cOut.AppendText(str.GetBuffer(0));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -