Oriented Control System MCL language compiler design
- Author
- GaoTao
- Advisor
- ZhangFan , TangGengSheng
- School
- University of Electronic Science and Technology
- Major
- Software Engineering
- Classification
- TP314 Compiler,interpreter
- Degree
- Master's thesis
- Year
- 2009
- Downloads
- 52
- Citations
- 0
Abstract
MCL language compiler is a kind of cross compiler developed for CK-01 which is an intelligent measurement & control instrument. The function of MCL language compiler is translating MCL language to the code which can beidentified by CK-01.CK-01 consists of the intelligent controller 80C51 and various process channel plates. It is subordinate to a host computer and it serves functions asreceiving instructions from the host computer, directing the functional parts to control the executive agency ,and performing data acquisition, etc.MCL language compiler has improved the man-machine interface function of CK-01 . Without MCL language compiler, developers have to use 80C51 language, they must know the internal structure ,storage organization and instruction system of 80C51 language. Additionally, they must be familiar with process channel plates. Clearly it is more difficult, low efficiency, and has not advantage of developing a high-quality program . This disadvantage can hinder the promotion of CK-01.With the development of MCL language compiler, users can make programs on PC with MCL language. This language is a kind of high-level progr-amming language, which has smaller statements set , simpler syntax and spec-ial statements for measurement & control. With MCL language compiler, users who know basic knowledge of computer programs can do the design work with no need to know the details of CK-01.This paper presents the design procedures of MCL language compiler , the logical structure of MCL language compiler ,the lexical analysis , grammaranalysis , semantic treatment of MCL language,and the solution of ambiguity problems are also given..
Table of contents
Abstract 4-5
Abstract 5-10
Chapter Introduction 10-15
1.1 Research and application value 10 - 11
1.2 compiler research and development at home and abroad progress 11-13
1.3 thesis problem to be solved 13-15
Chapter MCL compiler construction 15-28
2.1 compiler construction 15
2.2 source language 15-22
2.2.1 MCL language word 15-16
2.2.2 MCL language data types 16
2.2.3 MCL language statements 16-22
2.3 compiled 22 -25
2.3.1 compiler options 22-23
2.3.2 compiler is generated 23
2.3.3 compiler logical structure 23-25 ??
2.4 compiler tool selection 25
2.4.1 lexical analyzer generation tool 25
2.4.2 parser generator tool 25
2.5 target machine and the target language 25-26
2.6 MCL language compilation process 26-27
2.7 Summary 27 - 28
Chapter MCL compiler data management 28-37
3.1 symbol Table 28-33
3.1.1 symbol table data structure 28-29
3.1.2 symbol table information 29-31
3.1.3 symbol table organization 31-32
3.1.4 the symbol operating table 32-33
3.2 target machine data management 33-36
3.2.1 data type representation 33
3.2. 2 storage allocation process 33-34
3.2.3 array variable storage allocation 34-36
3.2.4 object code stored 36 <br / > 3.3 Chapter Summary 36-37
Chapter lexical analysis 37-42
4.1 LEX automatically generated lexical analyzer principle 37-39 <br / > 4.1.1 regular grammars 37
4.1.2 informal style with the regular set 37-38
4.1.3 finite Automata 38
4.1.4 LEX compiler implementation 38-39
4.1.5 LEX language 39
4.2 MCL lexical analyzer design 39-41 <br / > 4.2.1 generated lexical analyzer MCL process 39-40
4.2.2 MCL lexer objects processed 40
4.2.3 MCL lexical analyzer output 40-41
4.2.4 LEX and YACC communication 41
4.3 Chapter Summary 41-42
Chapter parsing 42-53
5.1 YACC parser automatically generates the principle 42-44
5.1.1 LR analysis 42-44
5.1.2 LR (K ) analysis 44
5.1.3 LALR (1) analysis 44
5.2 MCL parser designed 44-47
5.2.1 MCL parser generation process 44-45
5.2.2 MCL parser designed 45-47
5.2.3 YACC and LEX source code compilation process 47
5.3 grammatical ambiguity processing 47-50
5.3.1 shift / protocol analysis 47
5.3.2 grammatical ambiguity 47-48
5.3.3 ambiguity resolution 48-50
5.4 syntax error handling 50-52
5.4.1 syntax error recovery strategy 50-51
5.4.2 MCL compiler syntax error handling 51-52
5.5 Chapter Summary 52-53
Chapter semantic processing 53-72
6.1 MCL compiler semantic analysis of the theoretical basis 53-54
6.1.1 syntax- translation 53
6.1. 2 attribute grammar 53
6.1.3 semantic properties 53-54
6.1.4 calculation of semantic properties 54
6.2 MCL compiler semantics value is calculated 54-55
6.2.1 word ( terminator ) semantic value is calculated 54
6.2.2 nonterminal semantic value is calculated 54-55
6.3 type checking translations 55-56
6.4 Expository statements translation 56
6.5 reference translation 56-57 < br /> 6.6 translation assignment 57
6.7 expression translation 57
6.8 translation process 57-59
6.8.1 process description 57
6.8.2 procedure Call 57-59
6.8.3 procedure exits 59
6.9 Conditional statements translate 59-63
6.9.1 IF-THEN translation 60-61
6.9.2 IF-THEN-ELSE translation 61-63
6.10 WHILE statement translation 63-65
6.11 FOR statements translation 65-67
6.12 multi-branch statements translation 67-69
6.13 control dedicated statement translation 69-71
6.13.1 digital filtering 70
6.13.2 instruction redundancy 70
6.13.3 setup software trap 70-71
6.14 Summary 71-72
Chapter VII of the MCL compiler overall process and running interface 72-76
7.1 MCL language compiler overall process 72-73
7.2 MCL language compiler running interface 73-76
Chapter VIII conclusions 76-78
8.1 to obtain the main results 76-77
8.2 insufficient and further work 77-78
Thanks 78-79
References 79-81
Related dissertations
- The Research on Financial Service Outsourcing Risk Management of Commercial Banks
- The Research of Commercial Banks’ Operational Risk Metrics and Controls in China
- Design of Robot Multi-Function Measurement Control and Driving System Based on DSP2812
- Research on Quality Control of ERP Implementation
- The Research for the Measurement System of CY Company
- Research on Software Testing Measurement and Evaluation
- The research on government audit risk
- A Study on College Internal Audit Risk Based on Modern Risk-oriented Audit Mode
- Research on Control the Excessive Growth of the Social Medical Insurance Costs
- The Studies on the Recognition, Measurement and Disclosure of Insurance Liabilities
- A Research on the Credit Risk Control of Sub-National Goverment Bond
- The Study of Offshore Financial Operational Risk Control of a Bank
- Market-oriented of Interest Rates of Commercial Banks in China and its Measures
- Research on Risk Management of Puyang Heyin’s Town Bank
- The Research on Classification and Measurement of Financial Assets
- The Mechanisms and Measurement of Gains from Trade
- The Measurement of China’s Foreign Trade Costs and the Analysis of the Influence Factors
- Research on IT Outsourcing Risk Control of Medium-sized and Small Enterprises
- Study on Budgeting Control System of Activity-based Costs
- Research on the Logistics Cost Control of Chinese Manufacturer Enterprises