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

📄 bianyi.c

📁 简单的词法分析器在Linux上用C语言实现
💻 C
字号:
/* ============================================================================ Name        : bianyi.c Author      : xiaohe Version     : Copyright   : Your copyright notice Description : Hello World in C, Ansi-style ============================================================================ */#include <stdio.h>#include <stdlib.h>#include<string.h>#include"option.h"#include"scan.h"int main(int argc,char *argv[]){	scanner_init();/*	if(argc<2)	{		fprintf(stderr,"Please input the name of the source file!\n");		return EXIT_SUCCESS;	}*/	if((source=fopen("source","r"))==NULL)	{		fprintf(stderr,"Cannot open source file %s .\n",argv[1]);		return EXIT_SUCCESS;	}	while(!feof(source))	{		scanner();	}	show_ident();	printf("\n\n");	show_keywords();	printf("\n\n");	show_number();	printf("\n\n");	show_operator();	return EXIT_SUCCESS;}

⌨️ 快捷键说明

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