⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compile.h

📁 与vc++界面十分类似的词法分析器
💻 H
字号:
// Compile.h: interface for the CCompile class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_COMPILE_H__83C5ECF7_E6F2_437B_B301_BD1601BBEF2A__INCLUDED_)
#define AFX_COMPILE_H__83C5ECF7_E6F2_437B_B301_BD1601BBEF2A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CCompile  
{
public:
	int m_time;//文件结尾计数器
	void WriteResult();
	int IsConstant(LPCTSTR pszChars);
	int IsIdentifier(LPCTSTR pszChars);
	int CheckIdentifier(CString&identifier);
	int CheckConstant(CString&constant);
	BOOL CheckOperator(CString &op, int &ID);
	int Analyse();
	BOOL Compile(CString filepath,CString compilefile);
	CCompile();
	virtual ~CCompile();
protected:
	char Check();
	int DoFirst();
	char *Buffer;	    //扫描缓冲区,并以“@”作为结尾助记符
	int start,search;	//起点指示器与搜索指示器
	FILE* fp;           //程序文本的文件指针

private:

};

#endif // !defined(AFX_COMPILE_H__83C5ECF7_E6F2_437B_B301_BD1601BBEF2A__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -