ERROR.Cpp
资源名称:ictprop.rar [点击查看]
上传用户:tenhai
上传日期:2021-02-19
资源大小:492k
文件大小:1k
源码类别:
组合框控件
开发平台:
Visual C++
- #include "stdafx.h"
- #include <stdio.h>
- #include "rrtbl.h"
- #include "grmrgrph.h"
- #include "sntncelex.h"
- #include "error.h"
- #include "Monitor.h"
- error_t errcode;
- extern CMonitor theMonitor;
- release(void){
- dictrelease();
- rrrelease();
- expecrelease();
- rrready=0;
- releasegrmr();
- return 0;
- }
- errecovery(void){
- char emsg[100];
- switch (errcode){
- case NOGENERATOR: sprintf(emsg, "Generator of rule %d missedn", rulcount);
- break;
- case NORIGHTPART: sprintf(emsg, "Right part of rule %d missedn", rulcount); break;
- case UNKNOWNTERM: sprintf(emsg, "Unknown terminal in dictionaryn");break;
- case NOSTART: strcpy(emsg, "Starting rule missedn");break;
- case MEMFUL: strcpy(emsg, "Out of memoryn");break;
- case TBLFUL: strcpy(emsg, "Too many symbolsn");break;
- }
- release();
- //fprintf(stderr, "%s", emsg);
- CString eStr;
- eStr.Format("%s", emsg);
- theMonitor.display(eStr);
- errcode=(error_t)0;
- return 0;
- }