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

📄 mydialog.h

📁 本程序为用VC开发的词法分析程序
💻 H
字号:
#if !defined(AFX_MYDIALOG_H__F09796DA_0348_4D55_AC0B_DC71920B32D2__INCLUDED_)
#define AFX_MYDIALOG_H__F09796DA_0348_4D55_AC0B_DC71920B32D2__INCLUDED_

#include "token.h"	// Added by ClassView
#include "error.h"
#include "sign.h"	// Added by ClassView
#include "Ttoken.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyDialog.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CMyDialog dialog

class CMyDialog : public CDialog
{
// Construction
public:
	int ISEMPTY(TCHAR ch_in);
	void UAppendText(LPCSTR pText);
	void WriteToError();
	void WriteToSign();
	void WriteToToken();
	int num_sign;
	void LookUp(CString str_in,int in);
	int flag;
	Csign signtable;
	int num_error;
	int num_token;

	Cerror etable[200];

	int recogDIG(TCHAR ch_in);
	int recogSTR(TCHAR ch_in);
	int handleCOM(TCHAR ch_in);
	int recogGID(TCHAR ch_in);
	int recogDEL(TCHAR ch_in);
	int hcount;
	int lcount;
	CString c_word;
	TCHAR c_ch;
	int Recognize(TCHAR ch_in);

	CTtoken tokenstring[200];

	Ctoken tokentable[60];

	int ISILLEGLE(TCHAR ch);
	int ISKEYWORD(CString string);
	int ISEDGE(TCHAR ch);
	int ISLETTER(TCHAR ch);
	int ISDIG(TCHAR ch);
	
	void RAppendText(LPCSTR pText);
	void LAppendText(LPCSTR pText);
	CString GetLineText(int i);
	int GetLineLength(int i);
	CString h_buffer;                   //行缓冲器

	TCHAR Getchar(int i);

	CMyDialog(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CMyDialog)
	enum { IDD = IDD_MYDIALOG };
	CEdit	m_input;
	CEdit	m_result;
	CEdit	m_Cerror;
	CButton	m_ganalagy;
	CButton	m_exit;
	CString	m_Verror;
	CString	m_out;
	CString	m_edit;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyDialog)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CMyDialog)
	afx_msg void OnBexit();
	afx_msg void OnBwanalagy();
	afx_msg void OnBopen();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnPaint();
	virtual BOOL OnInitDialog();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnBsign();
	afx_msg void OnBtoken();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_MYDIALOG_H__F09796DA_0348_4D55_AC0B_DC71920B32D2__INCLUDED_)

⌨️ 快捷键说明

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