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

Request the full text

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

  1. The Research on Financial Service Outsourcing Risk Management of Commercial Banks
    NieShuYa ·Liaoning University of Technology ·2014 ·Master's thesis
  2. The Research of Commercial Banks’ Operational Risk Metrics and Controls in China
  3. Design of Robot Multi-Function Measurement Control and Driving System Based on DSP2812
  4. Research on Quality Control of ERP Implementation
    WangXiYan ·Suzhou University ·2013 ·Master's thesis
  5. The Research for the Measurement System of CY Company
  6. Research on Software Testing Measurement and Evaluation
  7. The research on government audit risk
    WangHongWei ·Yunnan University of Finance ·2013 ·Master's thesis
  8. A Study on College Internal Audit Risk Based on Modern Risk-oriented Audit Mode
  9. Research on Control the Excessive Growth of the Social Medical Insurance Costs
    PengManLi ·Anhui University of Finance ·2014 ·Master's thesis
  10. The Studies on the Recognition, Measurement and Disclosure of Insurance Liabilities
  11. A Research on the Credit Risk Control of Sub-National Goverment Bond
  12. The Study of Offshore Financial Operational Risk Control of a Bank
    GaoLiJie ·Ocean University of China ·2013 ·Master's thesis
  13. Market-oriented of Interest Rates of Commercial Banks in China and its Measures
    KongXiangLe ·Jiangxi Normal University ·2013 ·Master's thesis
  14. Research on Risk Management of Puyang Heyin’s Town Bank
    WangFang ·Ningxia University ·2014 ·Master's thesis
  15. The Research on Classification and Measurement of Financial Assets
    HanWenJing ·Guangxi University ·2012 ·Master's thesis
  16. The Mechanisms and Measurement of Gains from Trade
  17. The Measurement of China’s Foreign Trade Costs and the Analysis of the Influence Factors
    YinMin ·Ningbo University ·2013 ·Master's thesis
  18. Research on IT Outsourcing Risk Control of Medium-sized and Small Enterprises
    ZhuMengXia ·Dongbei University of Finance ·2013 ·Master's thesis
  19. Study on Budgeting Control System of Activity-based Costs
  20. Research on the Logistics Cost Control of Chinese Manufacturer Enterprises