资源简介
LR(0)语法分析器WINDOW.rar
LR(0)语法分析器WINDOW.rar
代码片段和文件信息
// AnalyzeDlg.cpp : implementation file
//
#include “stdafx.h“
#include “LR0ForWin.h“
#include “AnalyzeDlg.h“
#include
#include
#include “Pair.h“
using namespace std;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAnalyzeDlg dialog
CAnalyzeDlg::CAnalyzeDlg(CWnd* pParent /*=NULL*/)
: CResizingDialog(CAnalyzeDlg::IDD pParent)
{
//{{AFX_DATA_INIT(CAnalyzeDlg)
m_input = _T(““);
//}}AFX_DATA_INIT
m_strTempFilename = ““;
m_pTree = new CTreeDlg;
m_pTree->Create(IDD_DIALOG3 this);
m_pTree->SetControlInfo(IDC_TREE1 RESIZE_BOTH);
m_pTree->SetControlInfo(IDOK ANCHORE_BOTTOM | ANCHORE_RIGHT);
}
CAnalyzeDlg::~CAnalyzeDlg()
{
m_pTree->DestroyWindow();
delete m_pTree;
}
void CAnalyzeDlg::DoDataExchange(CDataExchange* pDX)
{
CResizingDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAnalyzeDlg)
DDX_Control(pDX IDC_EDIT1 m_edit1);
DDX_Control(pDX IDC_EXPLORER1 m_web);
DDX_Text(pDX IDC_EDIT1 m_input);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAnalyzeDlg CResizingDialog)
//{{AFX_MSG_MAP(CAnalyzeDlg)
ON_BN_CLICKED(IDC_BUTTON1 OnButton1)
ON_BN_CLICKED(IDC_BUTTON2 OnButton2)
ON_WM_ACTIVATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnalyzeDlg message handlers
void CAnalyzeDlg::OnOK()
{
// TODO: Add extra validation here
//CDialog::OnOK();
}
void CAnalyzeDlg::OnCancel()
{
// TODO: Add extra cleanup here
if (m_strTempFilename != ““)
DeleteFile(m_strTempFilename.c_str());
CResizingDialog::OnCancel();
}
void CAnalyzeDlg::OnButton1()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_pTree->m_tree.DeleteAllItems();
for(int i = 0; i < m_input.GetLength(); i ++)
{
if (!m_g.IsInVt(m_input.GetAt(i)))
{
MessageBox(“输入的句子不全部由终结符组成“ “错误“ MB_OK | MB_IConstop);
return;
}
}
assert(TreeStack.empty());
m_input += “#“;
char szTempPath[MAX_PATH];
char szTempName[MAX_PATH];
if (m_strTempFilename != ““)
::DeleteFile(m_strTempFilename.c_str());
::GetTempPath(100szTempPath);
::GetTempFileName(szTempPath“LR0“0szTempName);
m_strTempFilename = szTempName;
CStdioFile out;
out.Open(szTempName CFile::modeCreate | CFile::modeWrite);
out.WriteString(“\n“);
out.WriteString(“\n“);
out.WriteString(“tle>Untitled Document tle>\n“);
out.WriteString(“ta http-equiv=\“Content-Type\“ content=\“text/html; charset=gb2312\“>\n“);
out.WriteString(“\n“);
out.WriteString(“\n“);
out.WriteString(“yle=\“border-collapse: collapse\“ bordercolor=\“#111111\“>\n“);
out.WriteString(“\n 步骤 \n 状态栈<
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 121 2002-05-24 00:50 LR(0)语法分析器WINDOW\Copy of LR0ForWin\1.TXT
文件 115 2002-05-24 16:12 LR(0)语法分析器WINDOW\Copy of LR0ForWin\2.TXT
文件 98 2002-05-26 23:24 LR(0)语法分析器WINDOW\Copy of LR0ForWin\3.TXT
文件 123 2002-05-26 22:38 LR(0)语法分析器WINDOW\Copy of LR0ForWin\4.TXT
文件 155 2002-05-26 23:35 LR(0)语法分析器WINDOW\Copy of LR0ForWin\5.TXT
文件 8355 2002-05-25 01:04 LR(0)语法分析器WINDOW\Copy of LR0ForWin\AnalyzeDlg.cpp
文件 1917 2002-05-25 00:57 LR(0)语法分析器WINDOW\Copy of LR0ForWin\AnalyzeDlg.h
文件 166383 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\AnalyzeDlg.obj
文件 65002 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\EXPLORER.OBJ
文件 3511 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\GoData.obj
文件 187288 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\Grammar.obj
文件 233611 2003-12-01 11:35 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\LR0ForWin.exe
文件 488648 2003-12-01 11:35 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\LR0ForWin.ilk
文件 15830 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\LR0ForWin.obj
文件 5662216 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\LR0ForWin.pch
文件 730112 2003-12-01 11:34 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\LR0ForWin.pdb
文件 4596 2003-12-01 11:34 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\LR0ForWin.res
文件 69792 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\LR0ForWinDlg.obj
文件 4124 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\Pair.obj
文件 17768 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\Precept.obj
文件 46607 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\ProjectSet.obj
文件 25832 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\ResizingDialog.obj
文件 44239 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\Set.obj
文件 106165 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\StdAfx.obj
文件 42184 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\TableDlg.obj
文件 14771 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\TreeDlg.obj
文件 279552 2005-12-01 22:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\VC60.IDB
文件 495616 2003-11-22 11:05 LR(0)语法分析器WINDOW\Copy of LR0ForWin\Debug\VC60.PDB
文件 11161 2002-05-24 00:40 LR(0)语法分析器WINDOW\Copy of LR0ForWin\EXPLORER.CPP
文件 3747 2002-05-24 00:40 LR(0)语法分析器WINDOW\Copy of LR0ForWin\explorer1.h
............此处省略42个文件信息
相关资源
评论
共有 条评论