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

📄 instruct.cpp

📁 输入一个表达式子 然后输出 这个式子 的LL1文法形式
💻 CPP
字号:
// instruct.cpp: implementation of the Cinstruct class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "LL1.h"
#include "instruct.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Cinstruct::Cinstruct()
{
	uendflag=NULL;
}

Cinstruct::~Cinstruct()
{

}

bool Cinstruct::adduendflag(TCHAR c)
{
	if(c=='\0'){
		return FALSE;
	}
	Cuendflag * flag=uendflag;
	while(flag!=NULL){
		if(flag->flag==c){
			return FALSE;
		}
		flag=flag->next;
	}
	flag=new Cuendflag(c);
	if(uendflag==NULL){
		uendflag=flag;
		flag->next=NULL;
	}else{
		flag->next=uendflag;
		uendflag=flag;
	}
	return TRUE;
}

bool Cinstruct::checkll1()
{
	//Cendflag * endflag=Cendflag::head;
	//while(endflag!=NULL){
	//}
	return TRUE;
}

⌨️ 快捷键说明

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