資源簡介
根據(jù)判斷一個(gè)文法是LL(1)文法的三個(gè)條件,逐一實(shí)現(xiàn)其判別條件的算法實(shí)現(xiàn)。
滿足是LL(1)文法的三個(gè)條件:
(1)文法不含有左遞歸
(2)對(duì)于文法中每一個(gè)非終結(jié)符A,若它存在某個(gè)候選首符
集兩兩不相交,即,若A→α1|α2|…|αn,則first(αi)∩first(αj)=Φ (i≠j)
(3)對(duì)文法中的每個(gè)非終結(jié)符A,若它存在某個(gè)候選首符集包含ε,則first(A)∩follow(A)=Φ。
使用高級(jí)語言編寫和調(diào)試一個(gè)判斷文法是不是LL(1)文法的程序。程序通過給出的文法,首先判斷文法是否含有左遞歸,若沒有含有則求出其FIRST()集和FOLLOW()集。根據(jù)FIRST()集和FO
代碼片段和文件信息
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????19092??2010-05-24?17:54??LL1分析器.txt
?????文件???????3386??2010-05-24?17:57??LL(1)Parsing.rar
?????文件?????????64??2005-12-16?14:45??LL(1)文法判定\Products1.txt
?????文件?????????73??2005-12-19?12:35??LL(1)文法判定\Products2.txt
?????文件?????????64??2005-12-20?10:33??LL(1)文法判定\Products3.txt
?????文件?????????71??2005-12-20?15:02??LL(1)文法判定\Products4.txt
?????文件???????3006??2007-07-11?22:42??LL(1)文法判定\SimpleLL1\App.ico
?????文件???????1859??2005-12-16?09:37??LL(1)文法判定\SimpleLL1\AssemblyInfo.cs
?????文件??????45056??2007-07-06?18:30??LL(1)文法判定\SimpleLL1\bin\Debug\AxInterop.SHDocVw.dll
?????文件????????500??2007-07-11?23:00??LL(1)文法判定\SimpleLL1\bin\Debug\html\about.html
?????文件????????361??2007-07-11?23:59??LL(1)文法判定\SimpleLL1\bin\Debug\html\error.html
?????文件?????????74??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Debug\html\images\mm_arrow.gif
?????文件?????????43??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Debug\html\images\mm_spacer.gif
?????文件???????2084??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Debug\html\images\mm_travel2.css
?????文件???????8370??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Debug\html\images\mm_travel_photo.jpg
?????文件???????3484??2007-07-12?11:54??LL(1)文法判定\SimpleLL1\bin\Debug\html\showtemplate.html
?????文件???????4321??2007-07-12?19:12??LL(1)文法判定\SimpleLL1\bin\Debug\html\temp.html
?????文件?????126976??2007-07-12?12:20??LL(1)文法判定\SimpleLL1\bin\Debug\Interop.SHDocVw.dll
?????文件??????45056??2007-07-12?19:05??LL(1)文法判定\SimpleLL1\bin\Debug\SimpleLL1.exe
?????文件??????69120??2007-07-12?19:05??LL(1)文法判定\SimpleLL1\bin\Debug\SimpleLL1.pdb
?????文件???????5632??2005-11-11?22:25??LL(1)文法判定\SimpleLL1\bin\Debug\SimpleLL1.vshost.exe
?????文件??????45056??2007-07-06?18:30??LL(1)文法判定\SimpleLL1\bin\Release\AxInterop.SHDocVw.dll
?????文件????????500??2007-07-11?23:00??LL(1)文法判定\SimpleLL1\bin\Release\html\about.html
?????文件????????361??2007-07-11?23:59??LL(1)文法判定\SimpleLL1\bin\Release\html\error.html
?????文件?????????74??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Release\html\images\mm_arrow.gif
?????文件?????????43??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Release\html\images\mm_spacer.gif
?????文件???????2084??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Release\html\images\mm_travel2.css
?????文件???????8370??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Release\html\images\mm_travel_photo.jpg
?????文件???????3484??2007-07-12?11:54??LL(1)文法判定\SimpleLL1\bin\Release\html\showtemplate.html
?????文件???????4321??2007-07-12?15:54??LL(1)文法判定\SimpleLL1\bin\Release\html\temp.html
............此處省略75個(gè)文件信息
-----------?---------??----------?-----??----
?????文件??????19092??2010-05-24?17:54??LL1分析器.txt
?????文件???????3386??2010-05-24?17:57??LL(1)Parsing.rar
?????文件?????????64??2005-12-16?14:45??LL(1)文法判定\Products1.txt
?????文件?????????73??2005-12-19?12:35??LL(1)文法判定\Products2.txt
?????文件?????????64??2005-12-20?10:33??LL(1)文法判定\Products3.txt
?????文件?????????71??2005-12-20?15:02??LL(1)文法判定\Products4.txt
?????文件???????3006??2007-07-11?22:42??LL(1)文法判定\SimpleLL1\App.ico
?????文件???????1859??2005-12-16?09:37??LL(1)文法判定\SimpleLL1\AssemblyInfo.cs
?????文件??????45056??2007-07-06?18:30??LL(1)文法判定\SimpleLL1\bin\Debug\AxInterop.SHDocVw.dll
?????文件????????500??2007-07-11?23:00??LL(1)文法判定\SimpleLL1\bin\Debug\html\about.html
?????文件????????361??2007-07-11?23:59??LL(1)文法判定\SimpleLL1\bin\Debug\html\error.html
?????文件?????????74??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Debug\html\images\mm_arrow.gif
?????文件?????????43??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Debug\html\images\mm_spacer.gif
?????文件???????2084??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Debug\html\images\mm_travel2.css
?????文件???????8370??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Debug\html\images\mm_travel_photo.jpg
?????文件???????3484??2007-07-12?11:54??LL(1)文法判定\SimpleLL1\bin\Debug\html\showtemplate.html
?????文件???????4321??2007-07-12?19:12??LL(1)文法判定\SimpleLL1\bin\Debug\html\temp.html
?????文件?????126976??2007-07-12?12:20??LL(1)文法判定\SimpleLL1\bin\Debug\Interop.SHDocVw.dll
?????文件??????45056??2007-07-12?19:05??LL(1)文法判定\SimpleLL1\bin\Debug\SimpleLL1.exe
?????文件??????69120??2007-07-12?19:05??LL(1)文法判定\SimpleLL1\bin\Debug\SimpleLL1.pdb
?????文件???????5632??2005-11-11?22:25??LL(1)文法判定\SimpleLL1\bin\Debug\SimpleLL1.vshost.exe
?????文件??????45056??2007-07-06?18:30??LL(1)文法判定\SimpleLL1\bin\Release\AxInterop.SHDocVw.dll
?????文件????????500??2007-07-11?23:00??LL(1)文法判定\SimpleLL1\bin\Release\html\about.html
?????文件????????361??2007-07-11?23:59??LL(1)文法判定\SimpleLL1\bin\Release\html\error.html
?????文件?????????74??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Release\html\images\mm_arrow.gif
?????文件?????????43??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Release\html\images\mm_spacer.gif
?????文件???????2084??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Release\html\images\mm_travel2.css
?????文件???????8370??2005-12-16?13:15??LL(1)文法判定\SimpleLL1\bin\Release\html\images\mm_travel_photo.jpg
?????文件???????3484??2007-07-12?11:54??LL(1)文法判定\SimpleLL1\bin\Release\html\showtemplate.html
?????文件???????4321??2007-07-12?15:54??LL(1)文法判定\SimpleLL1\bin\Release\html\temp.html
............此處省略75個(gè)文件信息
- 上一篇:arduino的AFMotor庫文件
- 下一篇:M-K趨勢分析法
評(píng)論
共有 條評(píng)論