#include "define.h"
#include
#include
#include
#include
FILE *fp
/*//////////////////////////////////////////////////////////////////////////////
This is a pretreatment.
/////////////////////////////////////////////////////////////////////////////*/
void readIntoBuffer(char buffer[256])
{
char ch1
char temp
int i
for(i=0 i
输入一个正则表达式,可以使用: 小写字母或数字,表示终结符;*,闭包;+,并集;~,补集;E,空串;O,空集 然后程序将生成 相应的NFA,以及化简之后的DFA,最后再输入一个字符串,程序判断它是否满足该正则表达式-input is a regular expression, you can use : lowercase letters or numbers, said Fu end;* Closure; , And set; To complement the set; E, empty string; O, empty set procedures will then generate the corresponding NFA, and the simplification of the DFA after finally lose into a string, procedures judgment whether it is to meet the regular expression
词法分析程序的功能是,接受一个表达式,输出该表达式中的各类单词符号。测试词法分析程序时,可以按照一定格式输出各类单词符号。
本程序实现整数四则运算表达式的词法分析程序。-Lexical analyzer function is to accept an expression, the output of the expression of the various types of word symbols. Testing lexical analysis program, you can format the output according to certain types of word symbols. This procedure to achieve an integer 4 expression is the lexical analysis program.