error_.h
来自「一个C语言的词法分析器」· C头文件 代码 · 共 36 行
H
36 行
/*++
module name: error_.h
handle errors occured in process
--*/
#ifndef _ERROR_
#define _ERROR_
#define MAX_ERROR_NUM 128
/* error code in linear scan process */
#define ERROR_TOO_MANY 0
#define ERROR_UNKNOWN_CHAR 1
#define ERROR_ILLEGAL_STR 2
#define ERROR_ILLEGAL_CHAR 3
#define ERROR_ILLEGAL_REAL 4
/* more... */
/* error node */
typedef struct
{
int error_code;
int line;
void *p_item;
}ERROR_NODE, *PERROR_NODE;
/* error table that stores error information */
//extern int error_count;
extern int line;
//extern ERROR_NODE error_table[MAX_ERROR_NUM];
/* error handle functions */
void report_error(int error_code, int line, void *p_item );
void print_error (void );
#endif /* _ERROR_ */
/*******************************end of file***********************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?