⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 data.cpp

📁 与vc++界面十分类似的词法分析器
💻 CPP
字号:
#include "stdafx.h"
#include "Data.h"

int IsKeyWord(LPCTSTR pszChars, int nLength)
{
	for (int L = 0; KeywordList[L] != NULL; L ++)
	{
		if (strncmp(KeywordList[L], pszChars, nLength) == 0
				&&KeywordList[L][nLength] == 0)
			return L;
	}
	return -1;
}

int IsOperator(LPCTSTR pszChars, int nLength)
{
	for (int L = 0; OperateorList[L] != NULL; L ++)
	{
		if (strncmp(OperateorList[L], pszChars, nLength) == 0
				&&OperateorList[L][nLength] == 0)
			return L;
	}
	return -1;
}

int IsBoundary(char *pszChars)
{
	char ch;
	for (int L = 0; BoundaryList[L] != NULL; L ++)
	{
		ch=BoundaryList[L];
		if (strncmp(&ch, pszChars,1) == 0)
			return L;
	}
	return -1;
}


void SpliterPath(CString Path)
{
	/*memset(drive,0,_MAX_DRIVE);
	memset(dir,0,_MAX_DIR);
	memset(fname,0,_MAX_FNAME);
	memset(ext,0,_MAX_EXT);

	_splitpath(Path,drive,dir,fname,ext);*/
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -