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

📄 算符优先文法dlg.h

📁 编译原理课程设计 算符优先算法的实现 输出FIRSTVT和LASTVT
💻 H
字号:
// 算符优先文法Dlg.h : header file
//

#if !defined(AFX_DLG_H__C7F5021A_E637_442D_A1FC_80A4941475DC__INCLUDED_)
#define AFX_DLG_H__C7F5021A_E637_442D_A1FC_80A4941475DC__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog
#include "CStack.h"
class CMyDlg : public CDialog
{
// Construction
public:
	CMyDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMyDlg)
	enum { IDD = IDD_MY_DIALOG };
	CListCtrl	m_list4;
	CListCtrl	m_list3;
	CListCtrl	m_list2;
	CListCtrl	m_list;
	CEdit	m_con_sentence;
	CEdit	m_con_grammar;
	CString	m_grammar;
	CString	m_sentence;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation

protected:
	HICON m_hIcon;

	void InitVnVt(int);
	int InitPt();
	void SetFirstVt(int);
	void SetLastVt(int);
	void InsertFirstOrLast(char,char,CString);
	void Create_G_table(int);
	int Analyze(int);
	bool Guiyue(int,int,int,int);
	void Show_list1();
	void Show_list2(int);
	void Show_list3();
	void Show_list4();
	void InitListControl();
	bool Error(char,char,int);
	struct P
	{
		char pleft;
		CString pright;
	};

private:
	struct P Pt[100];
	CString Start;
	CString Vn;
	CString Vt;
	Sstack stack;
	bool FlagOk;                   //是否顺利完成规约的标志      
	CString output[50][6];
	char charstack[20];
	bool F[100][100];
	bool L[100][100];
	char G[100][100];

	// Generated message map functions
	//{{AFX_MSG(CMyDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBianyi();
	afx_msg void OnInputDefault();
	afx_msg void OnExit();
	afx_msg void OnCencle();
	afx_msg void OnCencel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


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

#endif // !defined(AFX_DLG_H__C7F5021A_E637_442D_A1FC_80A4941475DC__INCLUDED_)

⌨️ 快捷键说明

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