學編譯原理時寫的一個語法分析程序 一.[目的要求] ① 對輸入文法,由程序自動構造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、遵守文明蜘蛛規(guī)則:必須分析robots.txt文件和meta tag有無限制;一個線程抓完一個網頁后要sleep 2秒鐘; 5、能對HTML網頁進行解析,提取出鏈接URL,能判別提取的URL是否已處理過,不重復解析已crawl過的網頁; 6、能夠對spider/crawler程序的一些基本參數進行設置,包括:抓取深度(depth)、種子URL等; 7、使用User-agent向服務器表明自己的身份; 8、產生抓取統(tǒng)計信息:包括抓取速度、抓取完成所需時間、抓取網頁總數;重要變量和所有類、方法加注釋; 9、請遵守編程規(guī)范,如類、方法、文件等的命名規(guī)范, 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
上傳用戶:我干你啊