资源简介
编译原理实验,C#实现,
运行正确,基本没有Bug...
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TokenAnalysis_FormApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnAnalysis_Click(object sender EventArgs e)
{
TokenAnalysis.TokenAnalysis ta = new TokenAnalysis.TokenAnalysis();
ta.GetInput(rtxtInput.Text);
ta.GetTokens();
List< string > res = ta.GetResult();
lstResult.Items.Clear();
lstResult.Items.AddRange(res.ToArray());
}
private void btnExit_Click(object sender EventArgs e)
{
Application.Exit();
}
private void 保存SToolStripButton_Click(object sender EventArgs e)
{
saveFileDialog1.title = “保存分析结果“;
saveFileDialog1.Filter = “文本文件|*.txt“;
if( ( saveFileDialog1.ShowDialog() ) == DialogResult.OK ) {
if( saveFileDialog1.FileName != null ) {
FileInfo outFile = new FileInfo( saveFileDialog1.FileName );
StreamWriter fw = outFile.AppendText();
foreach( string tkString in lstResult.Items ) {
fw.WriteLine( tkString );
}
fw.Close();
}
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 22528 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\bin\Debug\TokenAnalysis_FormApp.exe
文件 44544 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\bin\Debug\TokenAnalysis_FormApp.pdb
文件 14328 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\bin\Debug\TokenAnalysis_FormApp.vshost.exe
文件 490 2007-07-21 01:33 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\bin\Debug\TokenAnalysis_FormApp.vshost.exe.manifest
文件 1620 2008-11-21 11:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Form1.cs
文件 13288 2008-11-21 11:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Form1.Designer.cs
文件 12433 2008-11-21 11:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Form1.resx
文件 2284 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug\TokenAnalysis_FormApp.csproj.FileListAbsolute.txt
文件 847 2008-11-21 11:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug\TokenAnalysis_FormApp.csproj.GenerateResource.Cache
文件 22528 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug\TokenAnalysis_FormApp.exe
文件 4677 2008-11-21 11:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug\TokenAnalysis_FormApp.Form1.resources
文件 44544 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug\TokenAnalysis_FormApp.pdb
文件 180 2008-11-18 10:42 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug\TokenAnalysis_FormApp.Properties.Resources.resources
文件 502 2008-11-18 10:25 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Program.cs
文件 1384 2008-11-18 10:25 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Properties\AssemblyInfo.cs
文件 2892 2008-11-18 10:25 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Properties\Resources.Designer.cs
文件 5612 2008-11-18 10:25 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Properties\Resources.resx
文件 1106 2008-11-18 10:25 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Properties\Settings.Designer.cs
文件 249 2008-11-18 10:25 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Properties\Settings.settings
文件 10279 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\TokenAnalysis.cs
文件 3832 2008-11-18 10:42 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\TokenAnalysis_FormApp.csproj
文件 953 2008-11-18 10:25 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp.sln
..A..H. 18944 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp.suo
目录 0 2008-11-18 10:32 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug\Refactor
目录 0 2008-11-18 10:25 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug\TempPE
目录 0 2008-11-18 12:00 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\bin\Debug
目录 0 2008-11-24 23:12 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj\Debug
目录 0 2008-11-18 12:00 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\bin
目录 0 2008-11-18 12:00 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\obj
目录 0 2008-11-18 12:00 Exp1\0_0_Project\TokenAnalysis_FormApp\TokenAnalysis_FormApp\Properties
............此处省略7个文件信息
- 上一篇:词法分析器源代码
- 下一篇:编译原理 LL1语法分析器
相关资源
- c#与西门子1500通讯
- 北邮-编译原理-词法分析
- c++调用C# COM 参数是结构体数组
- 现代编译原理-C语言描述
- CTP上期技术平台API及C#封装更新到CT
- 编译原理实验报告+代码+使用说明
- 编译原理课程设计-C语言子集编译器
- 赋值语句翻译c语言实现四元式
- 编译原理用C++消除左递归
- 编译原理简易C编译器
- 实现语法分析器-编译原理
- C#神思二代身份证读卡程序 demo
- 编译原理 LR分析器 c++代码
- 设计并实现TINYC语言的扫描程序TINYC
- C#调用百度地图获取经纬度
- 03 C#与C++dll互相传递字符串.rar
- c# 华大HD900身份证阅读器操作类
- 即时通讯开发源码终极版C#.NETC++都有
- LL(1)文法分析全过程(FIRST/FLLOW/S
- 编译原理 LR0项目集规范族的构造 L
- 山东大学编译原理实验源代码c++版
- 词法分析器有去除注释功能
- C#C++混合编程C#调用非托管C++类
- c#图书管理系统+详细数据库设计文档
- Visual Studio 2010 Express 学习版
- C++调用C#库例程
- c#与STK开发
- OPC Data Access 3.00 Source Code
- C#/C++麦克风插拔检测
- 使用C#创建webservice服务,并使用服务
评论
共有 条评论