词法分析器,将输入的字符串识别成c语言的关键字等
源代码在线查看: bydlg.h
// byDlg.h : header file
//
#if !defined(AFX_BYDLG_H__B1839D0D_A081_4791_8F8A_05AC926E5C51__INCLUDED_)
#define AFX_BYDLG_H__B1839D0D_A081_4791_8F8A_05AC926E5C51__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CByDlg dialog
#include
#include
#include
#define MAX 500 //分析表的最大容量
#define MAXBUF 1000
#include"link.h"
class CByDlg : public CDialog
{
// Construction
public:
void analyse(FILE *fpin,FILE *fpout);
int search(char *temp);
void init();
CByDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CByDlg)
enum { IDD = IDD_BY_DIALOG };
CLink m_me;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CByDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
CString m_strFileName;
// Generated message map functions
//{{AFX_MSG(CByDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnOpen();
afx_msg void OnFenxi();
afx_msg void OnStatic1();
afx_msg void OnSave();
afx_msg void OnOk();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CFont m_font;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_BYDLG_H__B1839D0D_A081_4791_8F8A_05AC926E5C51__INCLUDED_)