资源简介
编译原理课试验,词法分析,语法分析,算符优先的都有,给分享一下
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Text;
namespace Analy
{
class Cifafenxi
{
public struct twoyuanzu
{
public int code;//编码号
public String value;//元素
}
public const int GUANJIANZI = 1;
public const int YUNSUANFU = 2;
public const int JIEFU = 3;
public const int BIAOZHIFU = 4;
public const int CHANGSHU = 5;
public List list = new List();//存放可识别符号的列表
public List newwords = new List();//存放已识别符号串的列表
public Cifafenxi()
{
this.TwoCreate();//构造可识别符号列表
}
private void TwoCreate()
{
twoyuanzu t0 = new twoyuanzu();
twoyuanzu t1 = new twoyuanzu();
twoyuanzu t2 = new twoyuanzu();
twoyuanzu t3 = new twoyuanzu();
twoyuanzu t4 = new twoyuanzu();
twoyuanzu t5 = new twoyuanzu();
twoyuanzu t6 = new twoyuanzu();
twoyuanzu t7 = new twoyuanzu();
twoyuanzu t8 = new twoyuanzu();
twoyuanzu t9 = new twoyuanzu();
twoyuanzu t10 = new twoyuanzu();
twoyuanzu t11 = new twoyuanzu();
twoyuanzu t12 = new twoyuanzu();
twoyuanzu t13 = new twoyuanzu();
twoyuanzu t14 = new twoyuanzu();
twoyuanzu t15 = new twoyuanzu();
twoyuanzu t16 = new twoyuanzu();
twoyuanzu t17 = new twoyuanzu();
twoyuanzu t18 = new twoyuanzu();
twoyuanzu t19 = new twoyuanzu();
twoyuanzu t20 = new twoyuanzu();
twoyuanzu t21 = new twoyuanzu();
twoyuanzu t22 = new twoyuanzu();
twoyuanzu t23 = new twoyuanzu();
t0.code = GUANJIANZI; t0.value = “int“;
t1.code = GUANJIANZI; t1.value = “if“;
t2.code = GUANJIANZI; t2.value = “for“;
t3.code = GUANJIANZI; t3.value = “while“;
t4.code = GUANJIANZI; t4.value = “return“;
t5.code = GUANJIANZI; t5.value = “break“;
t6.code = GUANJIANZI; t6.value = “continue“;
t7.code = GUANJIANZI; t7.value = “main“;
t8.code = YUNSUANFU; t8.value = “+“;
t9.code = YUNSUANFU; t9.value = “-“;
t10.code = YUNSUANFU; t10.value = “*“;
t11.code = YUNSUANFU; t11.value = “/“;
t12.code = YUNSUANFU; t12.value = “=“;
t13.code = YUNSUANFU; t13.value = “<“;
t14.code = YUNSUANFU; t14.value = “>“;
t15.code = JIEFU; t15.value = ““;
t16.code = JIEFU; t16.value = “;“;
t17.code = JIEFU; t17.value = “(“;
t18.code = JIEFU; t18.value = “)“;
t19.code = JIEFU; t19.value = “{“;
t20.code = JIEFU; t20.value = “}“;
t21.code = GUANJIANZI; t21.value = “public“;
t22.c
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3272 2009-12-15 17:16 编译原理\Analy\Analy\Analy.csproj
文件 24576 2009-12-15 18:08 编译原理\Analy\Analy\bin\Debug\Analy.exe
文件 32256 2009-12-15 18:08 编译原理\Analy\Analy\bin\Debug\Analy.pdb
文件 5632 2005-12-08 14:51 编译原理\Analy\Analy\bin\Debug\Analy.vshost.exe
文件 8180 2009-12-15 17:38 编译原理\Analy\Analy\Cifafenxi.cs
文件 4099 2009-12-15 18:08 编译原理\Analy\Analy\FormMain.cs
文件 4843 2009-12-15 17:10 编译原理\Analy\Analy\FormMain.Designer.cs
文件 5814 2009-12-15 17:10 编译原理\Analy\Analy\FormMain.resx
文件 257 2009-12-15 18:21 编译原理\Analy\Analy\obj\Analy.csproj.FileList.txt
文件 617 2009-12-26 15:48 编译原理\Analy\Analy\obj\Analy.csproj.FileListAbsolute.txt
文件 845 2009-12-15 17:13 编译原理\Analy\Analy\obj\Debug\Analy.csproj.GenerateResource.Cache
文件 24576 2009-12-15 18:08 编译原理\Analy\Analy\obj\Debug\Analy.exe
文件 180 2009-12-15 17:13 编译原理\Analy\Analy\obj\Debug\Analy.FormMain.resources
文件 32256 2009-12-15 18:08 编译原理\Analy\Analy\obj\Debug\Analy.pdb
文件 180 2009-12-15 17:13 编译原理\Analy\Analy\obj\Debug\Analy.Properties.Resources.resources
文件 467 2009-12-15 17:04 编译原理\Analy\Analy\Program.cs
文件 1158 2009-12-15 17:02 编译原理\Analy\Analy\Properties\AssemblyInfo.cs
文件 2864 2009-12-15 17:02 编译原理\Analy\Analy\Properties\Resources.Designer.cs
文件 5612 2009-12-15 17:02 编译原理\Analy\Analy\Properties\Resources.resx
文件 1088 2009-12-15 17:02 编译原理\Analy\Analy\Properties\Settings.Designer.cs
文件 249 2009-12-15 17:02 编译原理\Analy\Analy\Properties\Settings.settings
文件 904 2009-12-15 17:02 编译原理\Analy\Analy.sln
..A..H. 15360 2009-12-26 15:48 编译原理\Analy\Analy.suo
文件 0 2009-12-15 18:00 编译原理\Analy\复件新建 文本文档2.txt
文件 2127 2009-12-15 16:49 编译原理\Analy\新建 文本文档2.txt
文件 62 2009-10-28 00:51 编译原理\算符优先12-31\算符优先\bin\Debug\boundedOperator.txt
文件 311 2009-10-28 01:08 编译原理\算符优先12-31\算符优先\bin\Debug\keywords.txt
文件 219 2009-10-28 01:06 编译原理\算符优先12-31\算符优先\bin\Debug\operator.txt
文件 30720 2009-12-31 00:05 编译原理\算符优先12-31\算符优先\bin\Debug\算符优先.exe
文件 67072 2009-12-31 00:05 编译原理\算符优先12-31\算符优先\bin\Debug\算符优先.pdb
............此处省略140个文件信息
评论
共有 条评论