資源簡介
壓縮文檔里包括源代碼和PASCAL詞法分析器的設(shè)計要求等。
代碼片段和文件信息
//?cifa.cpp?:?Defines?the?entry?point?for?the?console?application.
//
#include?“stdafx.h“
/*************************************
*?????pascal?簡單詞法分析器???????????*
*?????金成???
**************************************/
#include
#include
#include??????/*用到判斷字符的函數(shù)*/
#include?????/*復(fù)制字符串用*/
/********************************************************
*??????????定義數(shù)據(jù)結(jié)構(gòu)??(使用全局變量記錄)???????????*
*********************************************************/
char?ch;???????????????????????/*?當(dāng)前處理字符?*/
char?*keywords[]?=?{“begin“?“end“?“if“?“then“?
“while“?“do“?“else“?“and“?“not“?“or“}; /*?關(guān)鍵字?*/
char?sinSep[]?=?{‘+‘?‘-‘?‘*‘?‘;‘?‘(‘?‘)‘}; /*?單字符分界符?*/
char?*douSep[]?=?{“:=“?“<=“?“>=“?“<>“?“/*“}; /*?雙字符分界符?*/
const?int?k
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4692??2009-05-31?04:26??cifa\cifa.cpp
?????文件???????4512??2009-05-30?21:19??cifa\cifa.dsp
?????文件????????533??2009-05-30?21:19??cifa\cifa.dsw
?????文件??????50176??2009-05-31?04:26??cifa\cifa.ncb
?????文件??????54784??2009-05-31?04:26??cifa\cifa.opt
?????文件???????1302??2009-05-31?04:25??cifa\cifa.plg
?????文件???????1196??2009-05-30?21:19??cifa\ReadMe.txt
?????文件????????291??2009-05-30?21:19??cifa\StdAfx.cpp
?????文件????????667??2009-05-30?21:19??cifa\StdAfx.h
?????目錄??????????0??2009-05-31?08:53??cifa
?????文件??????27648??2009-06-02?22:43??詞法分析程序?qū)崿F(xiàn).doc
-----------?---------??----------?-----??----
???????????????145801????????????????????11
評論
共有 條評論