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

📄 wordanalysis.h

📁 PL0的编译系统,使用MFC编写界面,采用浮动窗口来仿VC的环境
💻 H
字号:
#if !defined(AFX_WORDANALYSIS_H__3059F47D_85C2_4480_B3F3_1299CB069D72__INCLUDED_)
#define AFX_WORDANALYSIS_H__3059F47D_85C2_4480_B3F3_1299CB069D72__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// WordAnalysis.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CWordAnalysis window
#include "Symbol.h"
#include "Compiler.h"

#define IDENT_LENGTH	11
#define MAX_NUMBER		2047
#define NUMBER_LENGTH	9

class CWordAnalysis : public CWnd
{
// Construction
public:
	CWordAnalysis();
	CWordAnalysis(CCompiler *);
// Attributes
public:
	CCompiler	*mCompiler;
	char		ht[20];
	int		line;			//current line
	char		id[IDENT_LENGTH+1];	//the identifier
	int		num;			//the number
	char		ch;			//the var to read  a char
	struct	WordTable{
		char word[IDENT_LENGTH+1];
		symbol sym;
		}*wt;
// Operations
public:
	void	CreateHashTable();
	int	Hush(char *s);
	int	Hushsrch(char *word);
	symbol	GetSymbol();			//to check next string is identifier or number or keyword 
	int	GetLine() {return line;}
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CWordAnalysis)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CWordAnalysis();

	// Generated message map functions
protected:
	//{{AFX_MSG(CWordAnalysis)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_WORDANALYSIS_H__3059F47D_85C2_4480_B3F3_1299CB069D72__INCLUDED_)

⌨️ 快捷键说明

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