学编译原理时写的一个语法分析程序 一.[目的要求] ① 对输入文法,由程序自动构造FIRST FOLLOW集 ② 对输入文法,由程序自动生成它的LL(1)分析表; ③ 对于给定的输入串,应能判断识别该串是否为给定文法的句型。 二.[题目分析] 该程序可分为如下几步: (1)读入文法 (2)判断正误 (3)若无误,判断是否为LL(1)文法 (4)若是,构造分析表; (5)由总控算法判断输入符号串是否为该文法的句型。
上传时间: 2015-10-17
上传用户:ippler8
HDOJ ACM input:The input consists of T test cases. The number of test cases ) (T is given in the first line of the input. Each test case begins with a line containing an integer N , 1<=N<=200 , that represents the number of tables to move. Each of the following N lines contains two positive integers s and t, representing that a table is to move from room number s to room number t (each room number appears at most once in the N lines). From the N+3-rd line, the remaining test cases are listed in the same manner as above.
上传时间: 2015-10-18
上传用户:三人用菜
acm HDOJ 1051WoodenSticks Description: There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called setup time, for the machine to prepare processing a stick. The setup times are associated with cleaning operations and changing tools and shapes in the machine. The setup times of the woodworking machine are given as follows: (a) The setup time for the first wooden stick is 1 minute. (b) Right after processing a stick of length l and weight w , the machine will need no setup time for a stick of length l and weight w if l<=l and w<=w . Otherwise, it will need 1 minute for setup.
标签: WoodenSticks Description length wooden
上传时间: 2014-03-08
上传用户:netwolf
Learning Kernel Classifiers: Theory and Algorithms, Introduction This chapter introduces the general problem of machine learning and how it relates to statistical inference. 1.1 The Learning Problem and (Statistical) Inference It was only a few years after the introduction of the first computer that one of man’s greatest dreams seemed to be realizable—artificial intelligence. Bearing in mind that in the early days the most powerful computers had much less computational power than a cell phone today, it comes as no surprise that much theoretical research on the potential of machines’ capabilities to learn took place at this time. This becomes a computational problem as soon as the dataset gets larger than a few hundred examples.
标签: Introduction Classifiers Algorithms introduces
上传时间: 2015-10-20
上传用户:aeiouetla
We propose a simple and effective method for detecting view- and scale-independent ridge-valley lines defined via first- and secondorder curvature derivatives on shapes approximated by dense triangle meshes.
标签: scale-independent ridge-valley and effective
上传时间: 2014-01-08
上传用户:sammi
对于CPU线程调度的模拟,CPU threads control simulation,包括first come first serve算法和run rubbing等,同时输出线程开始,切换,结束等信息。
上传时间: 2015-10-25
上传用户:wyc199288
1、锁定某个主题抓取; 2、能够产生日志文本文件,格式为:时间戳(timestamp)、URL; 3、抓取某一URL时最多允许建立2个连接(注意:本地作网页解析的线程数则不限) 4、遵守文明蜘蛛规则:必须分析robots.txt文件和meta tag有无限制;一个线程抓完一个网页后要sleep 2秒钟; 5、能对HTML网页进行解析,提取出链接URL,能判别提取的URL是否已处理过,不重复解析已crawl过的网页; 6、能够对spider/crawler程序的一些基本参数进行设置,包括:抓取深度(depth)、种子URL等; 7、使用User-agent向服务器表明自己的身份; 8、产生抓取统计信息:包括抓取速度、抓取完成所需时间、抓取网页总数;重要变量和所有类、方法加注释; 9、请遵守编程规范,如类、方法、文件等的命名规范, 10、可选:GUI图形用户界面、web界面,通过界面管理spider/crawler,包括启停、URL增删等
标签: 日志
上传时间: 2013-12-22
上传用户:wang5829
This book is intended for embedded system programmers, consultants and students interested in real-time operating systems. μC/OS-II is a high performance, deterministic real-time kernel and can be embedded in commercial products (see Appendix F, Licensing). Instead of writing your own kernel, you should consider μC/OS-II. You will find, as I did, that writing a kernel is not as easy as it first looks.
标签: consultants programmers interested intended
上传时间: 2015-11-06
上传用户:l254587896
① 对输入文法,由程序自动构造FIRST FOLLOW集 ② 对输入文法,由程序自动生成它的LL(1)分析表; ③ 对于给定的输入串,应能判断识别该串是否为给定文法的句型。
标签: 输入
上传时间: 2013-12-29
上传用户:253189838
输入已经消除左递归的以及提取公共左因子的LL(1)文法,再输入相应的表达式,若分析成功,则在递归输出过程中输出"acc",若不成功,则有相应的报错以及位置指名。注意,要把同一个非终结符的产生式分成单个输入。他会自动计算first,follow,预测分析表的构造,但并不输出。
上传时间: 2014-01-04
上传用户:我干你啊