📄 pl0test.cpp
字号:
#include "Pl0.h"
#include <iostream>
using namespace std;
void main() {
Pl0 test("demo\\pl0source1.txt", true, true);
Pl0::symset fsys;
test.block(fsys, 0, 0);
test.listCode(0);
cout<<"table表为:"<<endl;
test.printTable();
cout<<"错误的个数:"<<test.getError()<<endl;
cout<<"解释执行过程为:"<<endl;
test.interpret();
//cout<<" 1------输出目标代码;\n 2------输出table表;\n 3------输出错误数;\n 4------退出."<<endl;
//test1
/* while(test.fin.eof() != true) {
test.getsym();
}
int i =0;
while(i++ < 3) {
test.getsym();
}
ofstream out;
out.open("e:\\temp.txt");
out.write("dsafd", 5);
out.close;
*/
/* //try
4%2 == 0?cout<<"1" : cout << "0";
char buf[] = {"abc"};
cout << strlen(buf) << endl;
buf[0] = '\0';
cout << strlen(buf) << endl;
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -