词法分析器制作与应用 设计思想 (1)程序主体结构部分: 说明部分 %% 规则部分 %% 辅助程序部分 (2)主体结构的说明 在这里说明部分告诉我们使用的LETTER,DIGIT, IDENT(标识符,通常定义为字母开头的字母数字串)和STR(字符串常量,通常定义为双引号括起来的一串字符)是什么意思.这部分也可以包含一些初始化代码.例如用#include来使用标准的头文件和前向说明(forward ,references).这些代码应该再标记"%{"和"%}"之间 规则部分> 可以包括任何你想用来分析的代码 我们这里包括了忽略所有注释中字符的功能,传送ID名称和字符串常量内容到主调函数和main函数的功能. (3)实现原理 程序中先判断这个句语句中每个单元为关键字、常数、运算符、界符,对与不同的单词符号给出不同编码形式的编码,用以区分之。 PL/0语言的EBNF表示 <常量定义>::=<标识符>=<无符号整数> <标识符>::=<字母>={<字母>|<数字>} <加法运算符>::=+|- <乘法运算符>::=*|/ <关系运算符>::==|#|<|<=|>|>= <字母>::=a|b|…|X|Y|Z <数字>::=0|1|2|…|8|9
上传时间: 2015-11-04
上传用户:zhengzg
交通信号灯的控制: 1. 通过8255A并口来控制LED发光二极管的亮灭。 2. A口控制红灯,B口控制黄灯,C口控制绿灯。 3. 输出为0则亮,输出为1则灭。 4. 用8253定时来控制变换时间 。 要求:设有一个十字路口,1、3为南,北方向,2、4为东西方向,初始态为4个路口的红灯全亮。之后,1、3路口的绿灯亮,2、4路口的红灯亮,1、3路口方向通车。延迟30秒后,1、3路口的绿灯熄灭,而1,3路口的黄灯开始闪烁(1HZ)。闪烁5次后,1、3路口的红灯亮,同时2、4路口的绿灯亮,2、4路口方向开始通车。延迟30秒时间后,2、4路口的绿灯熄灭,而黄灯开始闪烁。闪烁5次后,再切换到1、3路口方向。之后,重复上述过程。
上传时间: 2014-01-03
上传用户:zhouli
design LP,HP,B S digital Butterworth and Chebyshev filter. All array has been specified internally,so user only need to input f1,f2,f3,f4,fs(in hz), alpha1,alpha2(in db) and iband (to specify the type of to design). This program output hk(z)=bk(z)/ak(z),k=1,2,..., ksection and the freq.
标签: Butterworth internally Chebyshev specified
上传时间: 2015-11-08
上传用户:253189838
1、典型连续时间信号波形绘制 1)单边指数信号 要求: (1) 画出t=0,1,2,…,500共501点 (2)在一个坐标系中用三种不同颜色分别绘制如下三种情况下的波形 (a) E=200,X=62.5 (b) E=200,X=125.0 (c) E=200,X=250.0 (3)标出特殊点的坐标,如t=0和 的坐标 代码为此题目的解
上传时间: 2014-11-30
上传用户:小草123
The Original USB 2.0 specification released on April 27, 2000 Errata to the USB 2.0 specification as of December 7, 2000 Mini-B connector Engineering Change Notice to the USB 2.0 specification. Pull-up/pull-down Resistors Engineering Change Notice to the USB 2.0 specification. Errata to the USB 2.0 specification as of May 28, 2002 Interface Association Descriptor Engineering Change Notice to the USB 2.0 specification. Rounded Chamfer Engineering Change Notice to the USB 2.0 specification as of October 8, 2003 Unicode Engineering Change Notice to the USB 2.0 specification as of February 21, 2005 Inter-Chip USB Supplement Revision 1.0 as of March 13, 2006 Revision 1.3 of the USB On-The-Go Supplement as of December 5, 2006 Revision 1.01 of the Micro-USB Cables and Connectors Specification as of April 4, 2007 USB 2.0 Link Power Management Addendum Engineering Change Notice to the USB 2.0 specification as of July 16, 2007.
标签: specification 2.0 USB Original
上传时间: 2013-12-31
上传用户:familiarsmile
// 移频选频原理 //Fvco=[(P*B)+A]*Frefin/R //P=32 //loop filter 100k----prescribe //R=12.8M/100K=128---Parameter1 //Fvco=频点*2+170280 -1400 //B=Fvco/32-----------Parameter2 //A=Fvco-32*B
标签: 100 prescribe Frefin filter
上传时间: 2013-12-26
上传用户:dancnc
I wrote this code early this year using ColdFire MCF5213 in codewarrior IDE. The LCD is STN B/W 320x240 dot matrix LCD. The code include 3 different fonts, and basic LCD driver. All original!
标签: this codewarrior ColdFire wrote
上传时间: 2013-12-20
上传用户:皇族传媒
该系统主要实现简单的大学学生选修课程的功能。 1.系统的用户主要分为2类:学生和管理员 2.数据描述 <1> 课程: 课程号、课程名、学分、学时、教师、开课学期、适用专业、最大选课人数 <2> 学生:学号、姓名、密码、专业年级 <3> 学生选课情况:学号、课程号、是否已经考试、成绩 <4> 管理员:编号、姓名、密码 3.功能描述 <1> 学生功能: a. 登录:学生使用学号和密码登录。 b. 选课功能:学生能够选择所需要的课程。 c. 退选功能:学生能够退选课程。 d. 选课情况查询:查询该学生已经选的课程(分学期)。 e. 成绩查询:查询该学生某一门课程的成绩,某学期所有课程的成绩。 <2> 管理员功能 a. 登录: b. 管理课程:包括课程的增加、删除、修改等。 c. 选课管理:能够列出指定学期、课程的选课学生名单,能够对学生的选课进行调整。 d. 成绩表管理:能够录入学生的成绩,列出指定学期、课程的成绩单。
上传时间: 2016-03-06
上传用户:jyycc
第7章 Java B/S结构编程 253 实例76 简单的Servlet程序 254 实例77 简单的留言簿 256 实例78 JSP+Java Bean的计数器 258 实例79 数据库查询 260 实例80 文件的上传下载 262 实例81 收发E-mail 267 实例82 B/S结构的聊天室 269 实例83 网上选课 276 实例84 B/S结构的商业应用——购物车 282 实例85 通过JSP调用Applet程序 285 实例86 JSP与XML的结合 2
上传时间: 2016-03-07
上传用户:maizezhen
功能:编写的计算皮亚诺相关系数 开发语言:ruby 调用:correlate(x,y) 其中,x,y为需要计算相关度的向量 调用示例: a = [3, 6, 9, 12, 15, 18, 21] b = [1.1, 2.1, 3.4, 4.8, 5.6] c = [1.9, 1.0, 3.9, 3.1, 6.9] c1 = correlate(a,a) # 1.0 c2 = correlate(a,a.reverse) # -1.0 c3 = correlate(b,c) # 0.8221970228 puts c1#,c2,c3
上传时间: 2013-12-18
上传用户:skfreeman