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

📄 myanylise.h

📁 数据库模拟程序 实现控制台命令词法分析
💻 H
字号:
// MyAnylise.h: interface for the CMyAnylise class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MYANYLISE_H__96FCD86D_5BF7_4F98_B28E_DB25838EEBED__INCLUDED_)
#define AFX_MYANYLISE_H__96FCD86D_5BF7_4F98_B28E_DB25838EEBED__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "StdAfx.h"
#include "DBControl.h"	// Added by ClassView

class CMyAnylise  
{
public:
	int len;
	void makeCMDLine();
	void ChekcCMD(Word word[]);
	int CheckCMDType;
	CDBControl m_dbControl;
	void ComplingOutPut(CPoint &pt, CString output_str);
	int count_false;
	int count_success;
	void OutputAnylistResult(CString str);

	char PopChar();
	void SetString(CString str);
	void SetIndex(int index);
	CMyAnylise(CString str);
	CString m_str;
	int index;
	CMyAnylise();
	virtual ~CMyAnylise();

	
	int loc,count,error;
	char ch[MAXSIZE];
	char key[32][10];
	char yunsuanfu[20];
	char fengefu[20];
	struct item unit[MAXSIZE];
	seqstack stack,input;////栈的声明;
	Word word[100];
	Symbol symbol[100];
	Constant constant[100];
	int line,tokenval;
	int word_count,symbol_count,constant_count,name_count,key_count;
	float tokenfloat;
	char name[10];
	int isYunsuan(char a);
	int isFenge(char a);
	void number(char w);
	void isSymbol(char w);
	void isOtherSymbol(char w);
	void analyze();
	void init();

	void CMyAnylise::SETNULL(seqstack *s1) ;
	int CMyAnylise::EMPTY(seqstack *s1);//判断栈是否为空
	void CMyAnylise::PUSH(seqstack *s1,char y);   //入栈
	void CMyAnylise::POP(seqstack *s1);//退栈
	void CMyAnylise::find();///查找分析表;
	void CMyAnylise::reverseOut();//输出两个栈的元素。将第二个栈的元素倒置输出。
	void CMyAnylise::clean();///清除本次语法分析的痕迹;
	int CMyAnylise::grammer();

	void CMyAnylise::go();
};

#endif // !defined(AFX_MYANYLISE_H__96FCD86D_5BF7_4F98_B28E_DB25838EEBED__INCLUDED_)

⌨️ 快捷键说明

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