Principles of Computer compiling

Source: Internet
Author: User

The programming language is a symbolic language designed for writing computer programs, which is used to carry out, describe, organize and deduce computer processes. The development of programming language is an evolving process, and the fundamental impetus is the higher abstraction mechanism and the better support for the design idea.

First, the concept of program design

Computer programming language is a continuous development process, is a low-level language to high-level language development process. The hardware of the computer can only recognize 0/1 machine instruction sequences, namely the machine instruction program, because the machine instruction is the most basic computer language. Later, the assembly language was also a machine. Later, people grew smarter and developed more powerful, more abstract languages to support programming and become high-level languages on a previous basis. High-level languages are closer to the natural language people use, improving the efficiency of programming.





Computers are only able to understand 0 and 1, so high-level programming languages need to be translated, and the program that holds this task becomes a "computer handler". There are many ways to translate language, the basic way is to compile, explain and compile. The interpreter also becomes an interpreter, either directly explaining the execution of the source program, or translating the program into some sort of intermediate code. The compiler translates the source program into the target language program and then runs the target program on the computer. Contrast: Interpreter, the source program does not generate an independent target program. The source program is translated into the target program at compile time.

In the process of programming language development, a lot of languages have been produced. The first high-level language to be widely used in scientific computing is fortran,cobol, a high-level language for transactional processing, Pascal's structured programming language, and C, which is both compiled and assembly language. Java and C + + are object-oriented. PHT is a dynamic Web page that is executed on the server, embedded in HTML documents, and is capable of executing dynamic Web pages quickly. The Python object-oriented interpretive programming language is also a scripting language.

II. basic components of programming language

Divided into four kinds, respectively, data, operation, control, transmission.

1. The data is divided into constants and variables, global quantities and local quantities, and data types. Constants, variable differences are already familiar, no longer repeat.


2. Transport Components

The values are called and referenced, and are already familiar, not repeating.

Iii. Fundamentals of language processing procedures

Language processing program is a general term of system software, and the main function is to translate programs written in high-level or assembly language into some kind of machine language program. It is divided into three main categories: assembler, compiler, and explanatory program.

The process of compiling is, lexical analysis, grammar analysis, semantic analysis, semantic analysis is to check whether the source program includes static semantic errors. Only when the syntax and semantics are correct can the compilation process be completed. Lexical analysis, grammatical analysis, semantic analysis are necessary, others are not necessary.

Summarize:

Part of this section of the exam is very fine, but carefully combed up, or very connected. This chapter also has a lot of concepts, compared to see, it is easy to distinguish. Learn this chapter, and once again know the ins and outs of computer language.


































Principles of Computer compiling

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.