資源簡介
PL/0語言詞法及語法分析系統(tǒng) 個非常好的詞法分析程序,加上語法的分析是一個難得一見的好實例-a very good lexical analysis procedure, in addition to the syntax analysis is a rare to see a good example

代碼片段和文件信息
//*************************************************************************
//?BCMenu.cpp?:?implementation?file
//?Version?:?3.034
//?Date?:?May?2002
//?Author?:?Brent?Corkum
//?Modified?by?:?jingzhou?xu
//*************************************************************************
#include?“stdafx.h“????????//?Standard?windows?header?file
#include?“BCMenu.h“????????//?BCMenu?class?declaration
#include????????//SK:?makes?A2W?and?other?spiffy?AFX?macros?work
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
#define?BCMENU_GAP?1
#ifndef?OBM_CHECK
#define?OBM_CHECK?32760?//?from?winuser.h
#endif
#if?_MFC_VER?<0x400
#error?This?code?does?not?work?on?Versions?of?MFC?prior?to?4.0
#endif
static?CPINFO?CPInfo;
//?how?the?menu‘s?are?drawn?in?win9x/NT/2000
UINT?BCMenu::original_drawmode=BCMENU_DRAWMODE_ORIGINAL;
BOOL?BCMenu::original_select_disabled=TRUE;
//?how?the?menu‘s?are?drawn?in?winXP
UINT?BCMenu::xp_drawmode=BCMENU_DRAWMODE_XP;
BOOL?BCMenu::xp_select_disabled=FALSE;
BOOL?BCMenu::xp_draw_3D_bitmaps=TRUE;
BOOL?BCMenu::hicolor_bitmaps=FALSE;
//?Variable?to?set?how?accelerators?are?justified.?The?default?mode?(TRUE)?right
//?justifies?them?to?the?right?of?the?longes?string?in?the?menu.?FALSE
//?just?right?justifies?them.
BOOL?BCMenu::xp_space_accelerators=TRUE;
BOOL?BCMenu::original_space_accelerators=TRUE;
CImageList?BCMenu::m_AllImages;
CArray?BCMenu::m_AllImagesID;
int?BCMenu::m_iconX?=?16;
int?BCMenu::m_iconY?=?15;
enum?Win32Type{
Win32s
WinNT3
Win95
Win98
WinME
WinNT4
Win2000
WinXP
};
Win32Type?IsShellType()
{
Win32Type??ShellType;
DWORD?winVer;
OSVERSIONINFO?*osvi;
winVer=GetVersion();
if(winVer<0x80000000){/*NT?*/
ShellType=WinNT3;
osvi=?(OSVERSIONINFO?*)malloc(sizeof(OSVERSIONINFO));
if?(osvi!=NULL){
memset(osvi0sizeof(OSVERSIONINFO));
osvi->dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
GetVersionEx(osvi);
if(osvi->dwMajorVersion==4L)ShellType=WinNT4;
else?if(osvi->dwMajorVersion==5L&&osvi->dwMinorVersion==0L)ShellType=Win2000;
else?if(osvi->dwMajorVersion==5L&&osvi->dwMinorVersion==1L)ShellType=WinXP;
free(osvi);
}
}
else?if??(LOBYTE(LOWORD(winVer))<4)
ShellType=Win32s;
else{
ShellType=Win95;
osvi=?(OSVERSIONINFO?*)malloc(sizeof(OSVERSIONINFO));
if?(osvi!=NULL){
memset(osvi0sizeof(OSVERSIONINFO));
osvi->dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
GetVersionEx(osvi);
if(osvi->dwMajorVersion==4L&&osvi->dwMinorVersion==10L)ShellType=Win98;
else?if(osvi->dwMajorVersion==4L&&osvi->dwMinorVersion==90L)ShellType=WinME;
free(osvi);
}
}
return?ShellType;
}
static?Win32Type?g_Shell=IsShellType();
void?BCMenuData::SetAnsiString(LPCSTR?szAnsiString)
{
USES_CONVERSION;
SetWideString(A2W(szAnsiString));??//SK:??see?MFC?Tech?Note?059
}
CString?BCMenuData::GetString(void)//returns?the?menu?text?in?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4482??2005-01-16?20:06??CompileSys\PL\PL.dsp
?????文件???????6292??2005-01-16?22:26??CompileSys\PL\PL.cpp
?????文件????????529??2005-01-08?19:17??CompileSys\PL\PL.dsw
?????文件??????49236??2005-01-17?11:50??CompileSys\PL\PL.exe
?????文件????????314??2005-01-08?19:17??CompileSys\PL\PL.h
?????文件???????1457??2005-01-08?19:17??CompileSys\PL\PL.rc
?????文件???????1577??2005-01-08?19:17??CompileSys\PL\ReadMe.txt
?????文件????????443??2005-01-08?19:17??CompileSys\PL\Resource.h
?????文件????????289??2005-01-08?19:17??CompileSys\PL\StdAfx.cpp
?????文件???????1106??2005-01-08?19:17??CompileSys\PL\StdAfx.h
?????文件???????1866??2005-01-16?21:36??CompileSys\PL\Compiler.h
?????文件????????486??2005-01-13?22:28??CompileSys\PL\Test.pas
?????文件???????7160??2005-01-16?19:55??CompileSys\PL\Define.h
?????文件??????34973??2005-01-16?20:27??CompileSys\PL\Compiler.cpp
?????目錄??????????0??2005-01-09?09:09??CompileSys\PL
?????文件???????1370??2005-01-13?20:47??CompileSys\IDE\IDE.h
?????文件???????4685??2005-01-13?20:29??CompileSys\IDE\ReadMe.txt
?????文件????????205??2005-01-13?20:29??CompileSys\IDE\StdAfx.cpp
?????文件???????1940??2005-01-14?19:54??CompileSys\IDE\ChildFrm.cpp
?????文件??????49236??2005-01-17?11:50??CompileSys\IDE\PL.exe
?????文件???????1697??2005-01-13?20:29??CompileSys\IDE\IDEDoc.cpp
?????文件????????716??2005-01-15?20:57??CompileSys\IDE\IDE.dsw
?????文件???????2392??2005-01-16?16:34??CompileSys\IDE\Resource.h
?????文件???????6951??2005-01-14?22:43??CompileSys\IDE\IDE.dsp
?????文件?????512086??2005-01-17?11:50??CompileSys\IDE\IDE.exe
?????文件???????1554??2005-01-14?19:53??CompileSys\IDE\ChildFrm.h
?????文件??????89917??2002-07-29?17:34??CompileSys\IDE\BCMenu.cpp
?????文件??????15600??2002-07-29?17:34??CompileSys\IDE\BCMenu.h
?????文件???????2056??2005-01-16?13:25??CompileSys\IDE\OutBar.cpp
?????文件??????18537??2005-01-17?09:21??CompileSys\IDE\IDE.rc
............此處省略54個文件信息
- 上一篇:51單片機室溫 體溫測量
- 下一篇:對矩形切割的分析,自己覺得挺實用
評論
共有 條評論