My little understanding of the principles of compilation

Source: Internet
Author: User

What is the principle of compiling?

Compiling principle is an important specialized course in computer science, which aims to introduce the general principle and basic method of compiling program construction. The content includes language and grammar, lexical analysis, parsing, grammar-guided translation, intermediate code generation, storage management, code optimization, and target code generation. In my opinion, compiling principle is the basic idea of compiling process, it is the bridge between high-level language and machine language.

What are the benefits of learning how to compile?

This course focuses on the compiler's production principles and technical issues. As a required course of undergraduate courses, it has also become a necessary part of the postgraduate entrance examination. Compiler theory and technology is essentially an algorithmic problem, of course, because this problem is very complex , its solution algorithm is relatively complex. We learn the data structure and algorithm analysis is also speaking of algorithms, but the basic algorithm, in other words, the introduction of the algorithm, and the compiler principle of this course is to focus on a more focused solution of an algorithm.

Compiling principles of teaching materials are divided into lexical analysis, grammar analysis, semantic analysis, runtime Environment, intermediate code, code generation, code optimization of these parts. Originally said, as a compiler, the part that works is the user input source program to the final code generation. But when we explain the final code generation, we have to explain the machine operating environment and so on. Because if you don't know how the machine executes the final code, then of course you don't know how to generate the right final code. These are things that we often do when we write our usual programs, but we seldom find out how they are done inside. Simply put, you want to make a thing out, then you must know the principle of production. If even the principle does not know, it is only according to the drawings to draw gourd. What's the loss of not learning how to compile? Very simple, you do not know the principle, did not learn the knowledge of this aspect, did not allow oneself in this aspect ability and the thought to get the corresponding enhancement.
How to learn the principles of compiling?

The course of compiling principle is the course of explaining principle, while the course of principle is concerned with explaining its basic theory. Therefore, the first need to repeat the book, this approach looks the most stupid, but the basic method. Second, the combination of source code. Because only understand the code, can say in the fundamental understanding of the theory. Then Shanfanjiujian, COP, improve the learning interest.

My little understanding of the principles of compilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.