资源简介
一 课程设计的目的 - 2 -
二 课程设计的内容及要求 - 2 -
2.1 课程设计内容 - 2 -
2.2 课程设计要求 - 2 -
三 实现原理 - 2 -
3.1、词法分析 - 2 -
3.2、语法分析 - 3 -
语法分析程序可以根据个人的掌握情况选用常见的几种语法分析方法:递归下降分析方法、LL(1)预测分析法、算符优先分析、LR分析等方法中的任何一种来实现,也可以选用不同的方法来分析不同的语法成分,最后再综合起来。这里做了算符优先分析和LR(0)分析演示。 - 4 -
3.3、语义分析 - 4 -
四 算法实现流程图 - 5 -
4.1. 词法分析算法 - 5 -
4.2. 语法分析算法思想 - 7 -
语法分析流程图 - 7 -
算符优先分析流程图 - 8 -
LR(0)预测分析流程图 - 8 -
五 测试数据 - 9 -
5.1词法分析测试数据 - 9 -
5.2 词法分析三个算法测试数据 - 10 -
5.3语法分析三个算法测试数据 - 10 -
5.4 语义分析测试数据 - 10 -
六 结果输出及分析 - 10 -
6.1语法分析阶段截图 - 11 -
6.2 语法分析两个算法截图 - 14 -
6.3语义分析阶段截图 - 15 -
七.软件运行环境及限制 - 15 -
八.心得体会 - 16 -
九.参考文献 - 16 -

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Text;
namespace mycompiler
{
class fhclass
{
string name;
string type;
string kind;
string val;
int length;
int token;
string addr;
public fhclass(string name int lengthint token string type string kindstring valstring addr)
{
this.name = name;
this.length = length;
this.token = token;
this.type = type;
this.kind = kind;
this.val = val;
this.addr = addr;
}
string NAME
{
get
{ return name; }
set
{ name = value; }
}
int LENGTH
{
get
{ return length; }
set
{ length = value; }
}
string TYPE
{
get
{ return type; }
set
{ type = value; }
}
string KIND
{
get
{ return kind; }
set
{ kind = value; }
}
string VAL
{
get
{ return val; }
set
{ val = value; }
}
int TOKEN
{
get
{ return token; }
set
{ token = value; }
}
string ADDR
{
get
{ return addr; }
set
{ addr = value; }
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-06-29 12:45 编译原理\
目录 0 2011-06-16 15:47 编译原理\mycomplier\
目录 0 2011-06-16 15:45 编译原理\mycomplier\Backup\
目录 0 2011-06-16 15:45 编译原理\mycomplier\Backup\mycompiler\
文件 919 2010-04-12 22:24 编译原理\mycomplier\Backup\mycompiler.sln
文件 21504 2010-04-12 22:24 编译原理\mycomplier\Backup\mycompiler.suo
文件 1604 2010-04-11 17:48 编译原理\mycomplier\Backup\mycompiler\fhclass.cs
文件 31405 2010-04-12 22:23 编译原理\mycomplier\Backup\mycompiler\Form1.cs
文件 19748 2010-04-12 22:23 编译原理\mycomplier\Backup\mycompiler\Form1.Designer.cs
文件 6794 2010-04-12 22:23 编译原理\mycomplier\Backup\mycompiler\Form1.resx
文件 3306 2010-04-11 16:34 编译原理\mycomplier\Backup\mycompiler\mycompiler.csproj
文件 469 2010-04-05 09:07 编译原理\mycomplier\Backup\mycompiler\Program.cs
目录 0 2011-06-16 15:45 编译原理\mycomplier\Backup\mycompiler\Properties\
文件 1168 2010-04-05 09:07 编译原理\mycomplier\Backup\mycompiler\Properties\AssemblyInfo.cs
文件 2876 2010-04-05 09:07 编译原理\mycomplier\Backup\mycompiler\Properties\Resources.Designer.cs
文件 5612 2010-04-05 09:07 编译原理\mycomplier\Backup\mycompiler\Properties\Resources.resx
文件 1095 2010-04-05 09:07 编译原理\mycomplier\Backup\mycompiler\Properties\Settings.Designer.cs
文件 249 2010-04-05 09:07 编译原理\mycomplier\Backup\mycompiler\Properties\Settings.settings
文件 603 2010-04-11 16:38 编译原理\mycomplier\Backup\mycompiler\tokenclass.cs
文件 920 2011-06-14 13:45 编译原理\mycomplier\compiler.sln
文件 51200 2011-06-17 09:32 编译原理\mycomplier\compiler.suo
目录 0 2011-06-17 09:26 编译原理\mycomplier\mycompiler\
文件 243 2010-04-08 11:50 编译原理\mycomplier\mycompiler.sln.recipe
文件 48640 2011-04-24 11:49 编译原理\mycomplier\mycompiler.suo
目录 0 2011-06-16 15:45 编译原理\mycomplier\mycompiler\bin\
目录 0 2011-06-16 15:45 编译原理\mycomplier\mycompiler\bin\Debug\
文件 79872 2011-06-17 09:26 编译原理\mycomplier\mycompiler\bin\Debug\mycompiler.exe
文件 179712 2011-06-17 09:26 编译原理\mycomplier\mycompiler\bin\Debug\mycompiler.pdb
文件 14328 2011-06-17 09:26 编译原理\mycomplier\mycompiler\bin\Debug\mycompiler.vshost.exe
文件 490 2009-06-11 05:14 编译原理\mycomplier\mycompiler\bin\Debug\mycompiler.vshost.exe.manifest
文件 30147 2011-06-16 23:55 编译原理\mycomplier\mycompiler\coach.cs
............此处省略56个文件信息
- 上一篇:基于PLC的洗衣机设计.zip
- 下一篇:银行系统UML 设计和分析
相关资源
- 编译词法分析器识别关键字常数和符
- SAMPLE (类pascal) 词法分析程序 C 版
- Delphi做的用于分析Pascal语言的词法分
- 编译原理LR(0)语法分析
- 编译原理实验:词法分析,语法分析
- 编译原理语法分析器、词法分析器
- pl/0编译器 语法分析
- 哈工大威海-编译原理实验报告和源码
- TINY+编译器 改编自原版TINY
- 编译原理课程设计 while do循环语句翻
- 词法分析器 -计算器版
- 天津理工大学编译原理实验2
- 词法语法分析器
- 词法分析器自动生成器 FLEX
- 中科院汉语词法分析系统ICTCLAS安装包
- 编译原理简单赋值语句的语法分析程
- 编译原理语法分析器课程设计
- 词法分析器Lex(编译原理)
- 杭电编译原理语法分析器
- LR0语法分析器
- 华工编译原理实验词法分析+语法分析
- 词法分析器
- 北方工业大学编译原理话语法分析实
- 编译原理语法分析器课程设计完美版
- 词法分析器有界面
- 武汉大学国际软件学院解释器构造作
- 编译原理课程设计(词法分析和语法
- 利用FLEX设计一个small c的词法分析器文
- 基于LR(0)方法的语法分析程序
- 编译原理 词法和语法分析
评论
共有 条评论