compile.h
来自「与vc++界面十分类似的词法分析器」· C头文件 代码 · 共 38 行
H
38 行
// 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 + =
减小字号Ctrl + -
显示快捷键?