Design of the dissimilar programming language translation model and methods

Author
LiangLiang
Advisor
WangXiaoBin
School
University of Electronic Science and Technology
Major
Computer Software and Theory
Classification
TP314 Compiler,interpreter
Degree
Master's thesis
Year
2005
Downloads
53
Citations
0

Request the full text

Abstract

With the rapid development of computer science and technology , the application of computer technology in a growing number of areas , the various functions of the software is developed by a large number of applications in our lives , learning , work them . Accordingly , also produced many of the programming language used to write computer programs . Software developers to use the programming language to write the program source code . In these program code , there are many functions performed are very approximate , and some even completely consistent . However, due to write to the program code using a different programming language , it is difficult to directly implement the transplantation of these program code and reuse . In order to improve the portability and reusability of code , to improve the efficiency of software development , and reduce the cost of software development and to facilitate the secondary development of software , the software developers who want to be able to achieve the dissimilar programming language to write the program code of between translations conversion . Set forth in the present paper is related to this topic . In this paper describes the design and implementation of a model system . The realization of the entire model system is a form of language and automata theory as the theoretical basis , draw compiler system . By the model system in various parts of the function corresponding analysis and processing to gradually analyze the source of lexical , syntactic and semantic aspects of language features , the source code gradually deconstruct language conversion can be directly translated word symbols , and they accordingly translator to convert , and eventually converted to another programming language to describe the source code to translate the source code . Forth in this paper for the realization of the the dissimilar programming language code translator conversion , meaningful ideas and methods to improve the portability and reusability of code .

Table of contents

Abstract 4-5 Abstract 5-6 catalog 6-10 Introduction 10-13 <br / > 1.1 the background and significance of the topic 10-11 1.2 with issues related to domestic and international dynamic research goal 1.3 11 1.4 author's work 11-12 1.5 papers organizational structure 12-13 second chapter the basis of the research work 13-21 2.1 programming language compiler-based system 13-16 2.1.1 compiler system overview the 13-16 2.1.2 compiler-based system programming languages ?? 16 2.2 formal language and automata description 2.2.1 grammars, 16-21 Overview 17-18 2.2.2 automata Overview 18-19 2.2.3 formal languages ??and automata theory based 19-21 Chapter overall architecture of the system model 21-27 3.1 model system design requirements the 21-22 3.1.1 requirements for a variety of programming languages ?? 21 3.1.2 draw on the the compiler system structure and analysis methods 21 the 3.1.3 model system of input requirements 21-22 3.2 to build a model system, some consider 22 3.3 build basic idea of ??the model system 22-23 3.4 model system architecture diagram 23-24 3.5 introduction to each section of the model system 24-27 Chapter pretreatment 27-31 4.1 logical segmentation of the source code the 27-28 4.1.1 logical segmentation 27 4.1.2 logic segmented principle 27-28 4.1.3 logical segmentation 4.2 function 28 pretreatment 28-29 4.2 .1 function of the pretreatment 28 4.2.2 functions pretreatment principle the method 28-29 4.2.3 function pretreatment 29 4.3 source code after pretreatment results 29-30 the 4.4 source pretreatment example 30-31 Chapter lexical decision 31-49 5.1 lexical analysis 31-35 5.1.1 regex string format 31-33 5.1.2 identification string of finite state machine the 33-35 5.2 scanning process 35-43 5.2.1 mark 35-38 mark 5.2.2 analysis determines nbsp 5.2.3 scan processing procedures; 38-40 the 40-41 5.2.4 scanning process.'s results 41-43 5.2.5 construct different languages the scan handler Description 43 5.3 tokens are structured dictionary 43-49 5.3.1 token dictionary data structure 44 5.3.2 mark the contents of the dictionary 44-45 5.3.3 mark dictionary classification 45-46 the 5.3.4 mark the dictionary source content written 46-47 5.3.5 mark the dictionary explanations write 47-49 Chapter the grammar determination 49-58 6.1 parsing 49 - 52 6.1.1 Context-Free Grammars analytical foundation 49 6.1.2 parsing instructions 49-50 6.1.3 parsing method Introduction 50 6.1.4 LR Analysis Method the 50-52 6.2 structure parser 52-55 6.2.1 YACC Introduction 52 6.2.2 YACC input format description 52-53 6.2.3 parser construct suitable model system 53-55 <br / > 6.3 parser parsing the 55-58 6.3.1 Syntax Tree 55-56 6.3.2 example source segment syntax tree 56-57 6.3.3 syntax tree is the basis for further analysis 57-58 Chapter VII of the semantic analysis 58-70 the 7.1 attribute grammars About 58-61 7.1.1 Properties 58-59 7.1.2 the attribute grammar nbsp the the 7.1.3 model system attribute grammar 59-60 ; the 60-61 properties 7.2 calculated the 61-64 7.2.1 Syntax-directed translation approaches 61-62 7.2.2 on the property calculated consideration 62 7.2.3 model system properties calculated the 62-63 7.2.4 Properties Calculation Program 63-64 7.3 abstract the constructor syntax tree 64-66 7.3.1 abstract syntax tree generator program 7.3.2 Example 64-65 abstract syntax tree of the source segment 65 -66 7.4 linear grammatical structure, said 66-70 7.4.1 abstract syntax tree linear representation 66-68 7.4.2 four yuan expressed as a three-address code 68 7.4.3 four yuan generation program 68-69 7.4.4 Example source paragraph four formula 69 -70 Chapter VIII translation conversion 70-84 8.1 semantic processes determine 70-79 8.1.1 mark label assignment procedures 70 - 77 8.1.2 semantic processes determine program 77-79 8.2 Translation conversion 79-82 8.2.1 token dictionaries program provides translation information 79-80 8.2.2 translation conversion program the 80-82 8.3 Translation conversion instance 82-84 Chapter Summary and Outlook 84-87 9.1 paper summarizes 84 9.2 further work to References 84-87 87-88 Acknowledgements 88-89 biographical notes and Papers 89

Related dissertations

  1. The Motion Logo Design Researchunder the New Media Technology
    YangXiaoWen ·Donghua University ·2014 ·Master's thesis
  2. Amdo strong painting style research.
    PengMaoCaiRang ·Tibet University ·2013 ·Master's thesis
  3. See "thou polysemous verbs from cognitive semantics" in
    ChenLi ·Xiangtan University ·2013 ·Master's thesis
  4. Worked Examples Learning of Active and Passive Voice Conversion Rules in English for Junior High School Students
    ZhaoLi ·Liaoning Normal University ·2013 ·Master's thesis
  5. Analysis of Legal Terminology of Hong Kong's Chinese/English Bilingual Legal Texts:a Lexicographical Perspective
    LouYuanYuan ·Wuhan University of Technology ·2014 ·Master's thesis
  6. A Study on the Decategorization of English Verb Tenses
    HeJuChun ·Central China Normal University ·2014 ·Doctoral dissertation
  7. Word-formation of Clothes-inherited Morpheme and Its Using in Teaching of Chinese as a Foreign Language
    ZhangYaZuo ·Anhui University ·2014 ·Master's thesis
  8. Research on Approximate Number Words in Teaching Chinese as a Second Language
    ZhangJingJing ·Hunan Normal University ·2014 ·Master's thesis
  9. A Study on the Special Time Adverbs in Xiangxiang Dialect
    LiuNa ·Central China Normal University ·2014 ·Master's thesis
  10. The modern Chinese "not N N" construction research
    ShenChen ·Yangzhou University ·2013 ·Master's thesis
  11. The Three Plane Research on Nominal Sentence
  12. The Internal Morpheme Linear Order of Chinese VN and NV Compounds
  13. The Study of Existential Sentences in Korean and Chinese
    JinMingYan ·Jilin University ·2013 ·Doctoral dissertation
  14. Reseach on the First Contact Target Object Verbs of Modern Chinese Language
    ZhangZuoZuo ·Shandong Normal University ·2014 ·Master's thesis
  15. Comparative Study between"Pashi" and "Pabushi"
    WangYaQun ·Central China Normal University ·2014 ·Master's thesis
  16. The Semantic Analysis and the Culture Explanation of Chinese Traditional Cultural Core Category of Xiao
    YeJianHua ·Fujian Normal University ·2012 ·Master's thesis
  17. Research and Application on Semantic Analysis of Chinese Terms
    ChenXiaoFang ·Shenyang Aerospace University ·2011 ·Master's thesis
  18. The Ambiguous Analysis of Pronoun of Natural Language Understanding and Its Application in Product Design
  19. Semantic Analysis Research of the Air Traffic Control Phraseology Based on Natural Language Understanding
    WangChu ·South China University of Technology ·2012 ·Master's thesis
  20. Design and Implimentation of the Personalized Web Service Recommendation Sub-System in Web Service Search Engine