wordanalysis.h

来自「PL0的编译系统,使用MFC编写界面,采用浮动窗口来仿VC的环境」· C头文件 代码 · 共 67 行

H
67
字号
#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 + =
减小字号Ctrl + -
显示快捷键?