error.c

来自「一个小型的c语言编译器,做的非常好,不过不是我做的.」· C语言 代码 · 共 36 行

C
36
字号
#include	<stdio.h>
#include	<conio.h>
#include	<stdlib.h>
#include	"Error.h"
#include	"Debug.h"
#include	"GenCode.h"

extern char *yytext;
extern int	*yylineno;

void	parse_error(char *info, char *info1)
{
	static char buf[255];

	sprintf(buf, "%s%s", info, info1);
	yyerror( buf );
}

void	yyerror(char *info)
{
	printf("%d", yylineno);
	putchar(' ');
	putchar(':');
	putchar(' ');
	puts(info);
//	getch();
}

void	user_exit(int status)
{
	remove_all_tmp();
	exit(status);
}


⌨️ 快捷键说明

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