資源簡介
首先可以去除注釋// /*.........*/
并以二元式形式將分析結果輸出到每行的后面
MFC實現

代碼片段和文件信息
//?LexicalAnalysis.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“LexicalAnalysis.h“
#include?“LexicalAnalysisDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CLexicalAnalysisApp
BEGIN_MESSAGE_MAP(CLexicalAnalysisApp?CWinApp)
//{{AFX_MSG_MAP(CLexicalAnalysisApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CLexicalAnalysisApp?construction
CLexicalAnalysisApp::CLexicalAnalysisApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CLexicalAnalysisApp?object
CLexicalAnalysisApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CLexicalAnalysisApp?initialization
BOOL?CLexicalAnalysisApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CLexicalAnalysisDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1423??2013-03-25?16:39??LexicalAnalysis.h
?????文件??????74752??2013-04-02?00:59??LexicalAnalysis.ncb
?????文件??????49664??2013-04-02?00:59??LexicalAnalysis.opt
?????文件???????1209??2013-04-02?00:58??LexicalAnalysis.plg
?????文件???????5796??2013-04-01?14:55??LexicalAnalysis.rc
?????文件??????12859??2013-04-02?00:58??LexicalAnalysisDlg.cpp
?????文件???????2095??2013-04-01?14:06??LexicalAnalysisDlg.h
?????文件???????3741??2013-03-25?16:39??ReadMe.txt
?????文件????????922??2013-04-01?15:04??resource.h
?????文件????????217??2013-03-25?16:39??StdAfx.cpp
?????文件???????1054??2013-03-25?16:39??StdAfx.h
?????文件?????127063??2013-04-02?00:58??Debug\LexicalAnalysis.exe
?????文件?????570820??2013-04-02?00:58??Debug\LexicalAnalysis.ilk
?????文件??????23913??2013-04-01?14:16??Debug\LexicalAnalysis.obj
?????文件????5505248??2013-03-25?16:45??Debug\LexicalAnalysis.pch
?????文件?????508928??2013-04-02?00:58??Debug\LexicalAnalysis.pdb
?????文件???????3692??2013-04-01?14:55??Debug\LexicalAnalysis.res
?????文件???????2560??2013-03-31?20:53??Debug\LexicalAnalysis.suo
?????文件?????101556??2013-04-02?00:58??Debug\LexicalAnalysisDlg.obj
?????文件?????105699??2013-03-25?16:45??Debug\StdAfx.obj
?????文件?????246784??2013-04-02?00:58??Debug\vc60.idb
?????文件?????413696??2013-04-02?00:58??Debug\vc60.pdb
?????文件????????766??2013-04-01?14:55??res\icon1.ico
?????文件???????1078??2013-03-25?16:39??res\LexicalAnalysis.ico
?????文件????????407??2013-03-25?16:39??res\LexicalAnalysis.rc2
?????文件???????1418??2013-04-01?14:48??LexicalAnalysis.clw
?????文件???????2189??2013-03-25?16:39??LexicalAnalysis.cpp
?????文件???????4384??2013-04-01?15:00??LexicalAnalysis.dsp
?????文件????????538??2013-03-25?16:39??LexicalAnalysis.dsw
?????目錄??????????0??2013-04-02?00:58??Debug
............此處省略4個文件信息
- 上一篇:QT開發多文檔框架
- 下一篇:C++ 多邊形邊緣填充算法
評論
共有 條評論