lr(0)語法分析器.doc
約36頁DOC格式手機(jī)打開展開
lr(0)語法分析器,lr(0)語法分析器頁數(shù) 36字?jǐn)?shù) 13452摘要編譯程序是現(xiàn)代計(jì)算機(jī)系統(tǒng)的基本組成部分之一,語法分析是編譯程序的核心部分,識別由語法分析給出的單詞符號序列是否是給定文法的正確句子,把詞法記號流按語言的語法結(jié)構(gòu)層次地分組,以形成語法短語。本文介紹了lr(0)分析器的一般原理、實(shí)現(xiàn)思想、基本設(shè)計(jì)方法以及主要實(shí)現(xiàn)技術(shù)和工具...
![](http://img.queshao.com/images/pcgzh.gif)
![](http://preview.queshao.com/tobuy/28394.gif)
內(nèi)容介紹
此文檔由會員 錢陽 發(fā)布
LR(0)語法分析器
頁數(shù) 36 字?jǐn)?shù) 13452
摘 要
編譯程序是現(xiàn)代計(jì)算機(jī)系統(tǒng)的基本組成部分之一,語法分析是編譯程序的核心部分,識別由語法分析給出的單詞符號序列是否是給定文法的正確句子,把詞法記號流按語言的語法結(jié)構(gòu)層次地分組,以形成語法短語。本文介紹了LR(0)分析器的一般原理、實(shí)現(xiàn)思想、基本設(shè)計(jì)方法以及主要實(shí)現(xiàn)技術(shù)和工具,并依據(jù)相應(yīng)原理設(shè)計(jì)語法分析課件,具有用戶使用簡單、功能完善等優(yōu)點(diǎn)。
本文主要工作集中在:
(1) 介紹語法分析的背景并詳細(xì)分析自下而上LR分析方法的特點(diǎn)。
(2) 闡述整個LR(0)語法分析器的系統(tǒng)結(jié)構(gòu)及工作原理。
(3) 設(shè)計(jì)實(shí)現(xiàn)文法輸入、從文本文件導(dǎo)入、保存、生成語法分析表、分析句子、生成分析樹等程序模塊。
(4) 分析并解決實(shí)現(xiàn)中的若干技術(shù)問題;如實(shí)現(xiàn)移進(jìn)規(guī)約分析、LR分析算法、構(gòu)造分析表等。
(5) 列舉完整的實(shí)驗(yàn)文法,進(jìn)行測試并分析結(jié)果。
關(guān)鍵字:
自下而上,語法分析,規(guī)約,產(chǎn)生式,項(xiàng)目,LR分析
Abstract
The compiler is one of basic composition department of the modern computer system. Syntactic analysis is a key part of the compiler. It discerns that if the array of syntax word symbol is the correct sentences of syntax that publish by syntactic analysis. It divide morphology mark array into groups morphology mark according to the grammar structure of the language, and form the grammar phrase. This thesis introduces general principle, realizing thought, basic design method and realizing technology and tool mainly of a syntactic analysis machine. In addition we designed lesson of syntactic analysis according to the corresponding principle,which is simple to use and with perfect function.
Key words:
From bottom to top Syntactic analysis Stipulations Producing sentence Project LR analyse
目 錄
1. 引言………………………………………………………3
2. 開發(fā)工具介紹…………………………………………….
2.1 面向?qū)ο蟮某绦蛟O(shè)計(jì)語言C++特點(diǎn)………………...
2.2 Visual C++特點(diǎn)……………………………………
3. 語法分析器相關(guān)原理介紹………………………………
3.1 語法分析簡述………………………………………
3.2 LR分析器…………………………………………
4. 項(xiàng)目需求分析及規(guī)劃…………………………………….
4.1 功能要求…………………………………………….
4.2 總體設(shè)計(jì)…………………………………………….
4.3 詳細(xì)設(shè)計(jì)………………………………………………
5. 系統(tǒng)設(shè)計(jì)和實(shí)現(xiàn)…………………………………………..
5.1 代碼開發(fā)…………………………………………….
5.2 功能測試…………………………………………….
6. 結(jié)束語……………………………………………………..
致謝……………………………………………………………
附錄:參考文獻(xiàn)…………………………………………………..
頁數(shù) 36 字?jǐn)?shù) 13452
摘 要
編譯程序是現(xiàn)代計(jì)算機(jī)系統(tǒng)的基本組成部分之一,語法分析是編譯程序的核心部分,識別由語法分析給出的單詞符號序列是否是給定文法的正確句子,把詞法記號流按語言的語法結(jié)構(gòu)層次地分組,以形成語法短語。本文介紹了LR(0)分析器的一般原理、實(shí)現(xiàn)思想、基本設(shè)計(jì)方法以及主要實(shí)現(xiàn)技術(shù)和工具,并依據(jù)相應(yīng)原理設(shè)計(jì)語法分析課件,具有用戶使用簡單、功能完善等優(yōu)點(diǎn)。
本文主要工作集中在:
(1) 介紹語法分析的背景并詳細(xì)分析自下而上LR分析方法的特點(diǎn)。
(2) 闡述整個LR(0)語法分析器的系統(tǒng)結(jié)構(gòu)及工作原理。
(3) 設(shè)計(jì)實(shí)現(xiàn)文法輸入、從文本文件導(dǎo)入、保存、生成語法分析表、分析句子、生成分析樹等程序模塊。
(4) 分析并解決實(shí)現(xiàn)中的若干技術(shù)問題;如實(shí)現(xiàn)移進(jìn)規(guī)約分析、LR分析算法、構(gòu)造分析表等。
(5) 列舉完整的實(shí)驗(yàn)文法,進(jìn)行測試并分析結(jié)果。
關(guān)鍵字:
自下而上,語法分析,規(guī)約,產(chǎn)生式,項(xiàng)目,LR分析
Abstract
The compiler is one of basic composition department of the modern computer system. Syntactic analysis is a key part of the compiler. It discerns that if the array of syntax word symbol is the correct sentences of syntax that publish by syntactic analysis. It divide morphology mark array into groups morphology mark according to the grammar structure of the language, and form the grammar phrase. This thesis introduces general principle, realizing thought, basic design method and realizing technology and tool mainly of a syntactic analysis machine. In addition we designed lesson of syntactic analysis according to the corresponding principle,which is simple to use and with perfect function.
Key words:
From bottom to top Syntactic analysis Stipulations Producing sentence Project LR analyse
目 錄
1. 引言………………………………………………………3
2. 開發(fā)工具介紹…………………………………………….
2.1 面向?qū)ο蟮某绦蛟O(shè)計(jì)語言C++特點(diǎn)………………...
2.2 Visual C++特點(diǎn)……………………………………
3. 語法分析器相關(guān)原理介紹………………………………
3.1 語法分析簡述………………………………………
3.2 LR分析器…………………………………………
4. 項(xiàng)目需求分析及規(guī)劃…………………………………….
4.1 功能要求…………………………………………….
4.2 總體設(shè)計(jì)…………………………………………….
4.3 詳細(xì)設(shè)計(jì)………………………………………………
5. 系統(tǒng)設(shè)計(jì)和實(shí)現(xiàn)…………………………………………..
5.1 代碼開發(fā)…………………………………………….
5.2 功能測試…………………………………………….
6. 結(jié)束語……………………………………………………..
致謝……………………………………………………………
附錄:參考文獻(xiàn)…………………………………………………..
TA們正在看...
- 小學(xué)數(shù)學(xué)三年級常用單位換算練習(xí)題.doc
- 小學(xué)數(shù)學(xué)三年級速算與巧算技巧.doc
- 小學(xué)數(shù)學(xué)三年級長方形和正方形的面積測試題.doc
- 小學(xué)數(shù)學(xué)與數(shù)學(xué)思想讀后感.doc
- 小學(xué)數(shù)學(xué)個人課題研究計(jì)劃.doc
- 小學(xué)數(shù)學(xué)二年級上冊教學(xué)計(jì)劃.doc
- 小學(xué)數(shù)學(xué)二年級上冊知識樹.doc
- 小學(xué)數(shù)學(xué)二年級上冊知識樹教材研說.doc
- 小學(xué)數(shù)學(xué)二年級上學(xué)期口算加減法解決問題集錦.doc
- 小學(xué)數(shù)學(xué)二年級下冊應(yīng)用題300題資料.doc