?? word.h
字號:
#pragma once
//#include<iostream>
#include"Mystring.h"
#include<fstream>
#include<cstring>
using namespace std;
class Mystring;
class Word
{
public:
Word(void); //構(gòu)造
~Word(void){} //析構(gòu)
bool forMain(); //界面函數(shù)
protected:
bool infIn(); //讀源文件
bool wordAnalyze(char *line); //做詞法分析
bool isInWord(char *arry); //判斷是否是保留字
bool isSign(char frist,char second='\0'); //判斷是否是運算符
bool isMarco(char *arry); //判斷是否是編譯宏
bool isBound(char data); //判斷是否是分界符
bool isWord(char data); //判斷字母
bool isNum(char data); //判斷數(shù)字字符
bool outPut(char *word,char *strings=NULL); //將strings的內(nèi)容寫進文件outputfilename中
bool outPut(char data,char *strings=NULL); //將一個字符寫進文件中
bool outPut(char data1,char data2,char *strings=NULL);//將兩個字符寫進文件中
bool setFlag(); //改變flag的值
private:
Mystring inword; //保留字
Mystring marco; //編譯宏
Mystring sign; //運算符集
Mystring bound; //分界符集
ofstream outfile; //保存分析結(jié)果的文件對象
char word[64]; //字符緩沖區(qū)
char outputfilename[32]; //輸出文件名
bool flag; //是否向輸出文件寫入源碼注釋
bool flagto_txt; //注釋開關(guān)
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -