资源简介
编写程序利用DFA的原理实现高级语言中浮点数的识别算法

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace 浮点数的DFA
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
/******************状态函数******************/
private int zt0(char c)
{
if (c == ‘+‘ || c == ‘-‘)
{
listBox_xs.Items.Add(“状态0→1 (条件‘+/-‘)“);
return 1;
}
else if (c == ‘.‘)
{
listBox_xs.Items.Add(“状态0→3 (条件‘.‘)“);
return 3;
}
else if (c >= ‘0‘ && c <= ‘9‘)
{
listBox_xs.Items.Add(“状态0→2 (条件数字‘“+c+“‘)“);
return 2;
}
else return 9; //9-错误状态
}
private int zt1(char c)
{
if (c >= ‘0‘ && c <= ‘9‘)
{
listBox_xs.Items.Add(“状态1→2 (条件数字‘“ + c + “‘)“);
return 2;
}
else return 9;
}
private int zt2(char c)
{
if (c >= ‘0‘ && c <= ‘9‘)
{
listBox_xs.Items.Add(“状态2→2 (条件数字‘“ + c + “‘)“);
return 2;
}
if (c == ‘.‘)
{
listBox_xs.Items.Add(“状态2→3 (条件‘.‘)“);
return 3;
}
if (c == ‘e‘ || c == ‘E‘)
{
listBox_xs.Items.Add(“状态2→5 (条件‘e/E‘)“);
return 5;
}
else return 9;
}
private int zt3(char c)
{
if (c >= ‘0‘ && c <= ‘9‘)
{
listBox_xs.Items.Add(“状态3→4 (条件数字‘“ + c + “‘)“);
return 4;
}
else return 9;
}
private int zt4(char c)
{
if (c >= ‘0‘ && c <= ‘9‘)
{
listBox_xs.Items.Add(“状态4→4 (条件数字‘“ + c + “‘)“);
return 4;
}
if (c == ‘e‘ || c == ‘E‘)
{
listBox_xs.Items.Add(“状态4→5 (条件‘e/E‘)“);
return 5;
}
else return 9;
}
private int zt5(char c)
{
if (c == ‘+‘ || c == ‘-‘)
{
listBox_xs.Items.Add(“状态5→6 (条件‘+/-‘)“);
return 6;
}
if (c >= ‘0‘ && c <= ‘9‘)
{
listBox_xs.Items.Add(“状态5→7 (条件数字‘“ + c + “‘)“);
return 7;
}
else return 9;
}
private int zt6(char c)
{
if (c >= ‘0‘ && c <= ‘9‘)
{
listBox_xs.Items.Add(“状态6→7 (条件数字‘“ + c + “‘)“);
return 7;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5273 2008-10-27 10:13 Form1.cs
文件 24576 2008-10-27 10:13 浮点数的DFA.exe
----------- --------- ---------- ----- ----
29849 2
相关资源
- pb (powerbuilder) 编写的自动转台控制
- NFA的确定化NFA->DFA完整可运行代码
- 浮点数IEEE754标准
- 6进制与浮点数包括float和double互转、
- DVDFab_VirtualDrive
- MF-DFA论文
- E2V的CMOS芯片 EV76C541数据手册
- Verilog HDL 浮点数除法器设计
- dfa作图工具
- RE到NFA的转换
- BDFACSCanto II_使用说明书
- STM32_SD_FATFS文件系统学习资料
- 正则表达式转化为DFA程序的设计与实
- 赛灵思浮点数IP文档
- 编译原理 第二版 刘坚 课后习题答案
- SDFAWDFSA.rar
- ADFA-LD数据集
- 计算机网络第5版英文版PDFAndrew.S.Tan
- Verilog 浮点数加法器
- 5aafaafe7897dfa0be78a1955a1a80ac.pdf
- OpenGL.Superbible.7th.Edition(pdfandsourceco
- 光纤通信第三版教材PDF格式
- 《TMS320C6655 和 TMS320C6657 定点及浮点数
- Introduction_to_computing_systemsPDFandLC3simu
- 邮箱批量采集].Fast.Email.Extractor.Enter
- 天韵K歌p10驱动
- 基于optisystem的EDFA仿真
- 浮点数加减运算器.zip
- 编译原理程序小集正则表达式 NFA DF
- 644aea1aea3c4656007473dfaa00b883.rar
评论
共有 条评论