一、 程序设计题目与说明
利用有穷自动机去除C语言代码行注释(//)以及块注释(/* */)
该有穷自动机的状态转换图如下:
二、 核心代码(或全部代码)
#include<stdio.h>
#include<stdlib.h>
/*The encoding of this file is GB2312(Simplified)*/
/*Please use GB2312(Simplified) encoding Otherwise it will cause garbled characters*/
int main() {
//该自动机存在6种状态 其中status0为