上下文無關文法(Context-Free Grammar, CFG)是一個4元組G=(V, T, S, P),其中,V和T是不相交的有限集,S∈V,P是一組有限的產生式規則集,形如A→α,其中A∈V,且α∈(V∪T)*。V的元素稱為非終結符,T的元素稱為終結符,S是一個特殊的非終結符,稱為文法開始符。 設G=(V, T, S, P)是一個CFG,則G產生的語言是所有可由G產生的字符串組成的集合,即L(G)={x∈T* | Sx}。一個語言L是上下文無關語言(Context-Free Language, CFL),當且僅當存在一個CFG G,使得L=L(G)。 *⇒ 例如,設文法G:S→AB A→aA|a B→bB|b 則L(G)={a^nb^m | n,m>=1} 其中非終結符都是大寫字母,開始符都是S,終結符都是小寫字母。
標簽: Context-Free Grammar CFG
上傳時間: 2013-12-10
上傳用戶:gaojiao1999
AT24系列存貯器和AT89系列單片機的特征及總線狀態作為介紹,并以AT24C01與AT89C2051為例詳細描述了通用存貯器IC卡的工作原理及用單片機對其進行讀寫操作的基本電路連接和軟件編程方法
上傳時間: 2013-12-19
上傳用戶:dreamboy36
我們利用EM公司(EMMICROELECTRONICMARINSA,2074MARIN-Switzerland)生產的P4095芯片,制作了IC卡讀頭,并在此基礎上,編寫了EM公司H4001非接觸式IC卡的讀卡程序。
上傳時間: 2014-05-23
上傳用戶:牧羊人8920
一:需求分析 1. 問題描述 魔王總是使用自己的一種非常精練而抽象的語言講話,沒人能聽懂,但他的語言是可逐步解釋成人能聽懂的語言,因為他的語言是由以下兩種形式的規則由人的語言逐步抽象上去的: ----------------------------------------------------------- (1) a---> (B1)(B2)....(Bm) (2)[(op1)(p2)...(pn)]---->[o(pn)][o(p(n-1))].....[o(p1)o] ----------------------------------------------------------- 在這兩種形式中,從左到右均表示解釋.試寫一個魔王語言的解釋系統,把 他的話解釋成人能聽得懂的話. 2. 基本要求: 用下述兩條具體規則和上述規則形式(2)實現.設大寫字母表示魔王語言的詞匯 小寫字母表示人的語言的詞匯 希臘字母表示可以用大寫字母或小寫字母代換的變量.魔王語言可含人的詞匯. (1) B --> tAdA (2) A --> sae 3. 測試數據: B(ehnxgz)B 解釋成 tsaedsaeezegexenehetsaedsae若將小寫字母與漢字建立下表所示的對應關系,則魔王說的話是:"天上一只鵝地上一只鵝鵝追鵝趕鵝下鵝蛋鵝恨鵝天上一只鵝地上一只鵝". | t | d | s | a | e | z | g | x | n | h | | 天 | 地 | 上 | 一只| 鵝 | 追 | 趕 | 下 | 蛋 | 恨 |
上傳時間: 2014-12-02
上傳用戶:jkhjkh1982
這篇文章發表在《單片機與嵌入式系統應用》2005年第三期,我已經和彭先生聯系上了!他會回答大家的問題的 2002年初,筆者著手寫一個IC卡預付費電表的工作程序,該電表使用Philips公司的8位51擴展型單片機87LPC764,要求實現很多功能,包括熄顯示、負荷計算與控制、指示閃爍以及電表各種參數的查詢等,總之,要使用時間的單元很多。筆者當時使用ASM51完成了這個程序的編寫,完成后的程序量是2KB多一點。后來,由于種種原因,這個程序并沒有真正使用,只是作了一些改動之后用在一個老化設備上進行計時與負荷計算。約一年后,筆者又重新改寫了這些代碼。
上傳時間: 2014-01-17
上傳用戶:jackgao
We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
標簽: represented integers group items
上傳時間: 2016-01-17
上傳用戶:jeffery
用C語言開發的PDA操作系統程序,帶顯示和IC卡讀寫功能,用于現場管理
上傳時間: 2013-12-18
上傳用戶:gundan
The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).
標簽: converts Toolbox complex logical
上傳時間: 2016-02-12
上傳用戶:a673761058
智能卡多應用一直是業界的重要課題,普通的IC卡應用基于ISO7816標準,采用文件的方式,我們采用面向對象的方式,采用容器和對象來實現多應用,這是一個完整的版本,實現內存管理(Java Card2.1沒有垃圾回收)。
標簽: 智能卡
上傳時間: 2013-12-05
上傳用戶:xz85592677
首先利用Sql Sever數據庫作為后臺,利用VB.NET進行界面的構建以及SQl Sever的連接操作查詢,并且利用Vb.NET和串口進行通信,獲取IC卡信息
上傳時間: 2016-03-25
上傳用戶:WMC_geophy