?? scannermain.cpp
字號(hào):
#include "scanner.h"
#include<iostream>
using namespace std;
void main(/*int argc,char *argv[]*/)
{
Token token;
/*if(argc<2)
{
cout<<"Input Source File!"<<endl;
return ;
}*/
char filename[50];
cout<<"Input Source File!"<<endl;
cin>>filename;
if(!InitScanner(filename/*argv[1]*/))
{
cout<<"Open Source File Error"<<endl;
return ;
}
cout<<"記號(hào)類別"<<" "<<"字符串"<<" "<<"常數(shù)"<<" "<<"函數(shù)指針"<<endl;
cout<<"-------------------------------------------"<<endl;
while(1)
{
token=GetToken();
if(token.type!=NONTOKEN)
cout<<token.type<<" "<<token.lexeme<<" "<<token.value<<" "<<token.FuncPtr<<endl;
else break;
};
cout<<"-----------------------------------------------"<<endl;
CloseScanner();
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -