Real questions for software designers, special exercises in programming language (5)

Video explanation

Software Designer Morning Questions Programming Topic

Symbol table

During the compilation process, the translation of high-level language program statements mainly considers declaration statements and executable statements. For declaration statements, it is mainly to correctly fill in the required information into a reasonably organized (49); for executable statements, it is (50). (First half of 2013)
(49)
A. Symbol table B. Stack C. Queue D. Tree
(50)
A. Translate into machine code and execute it B. Convert into syntax tree
C. Translate into intermediate code or target codeD. Convert to finite automaton

The function of the symbol table is to record the necessary information of each symbol in the source program to assist in semantic correctness checking and code generation. During the compilation process, the symbol table needs to be quickly and effectively searched, inserted, modified and deleted. Wait for operations. The establishment of the symbol table can start from the lexical analysis stage, or can be placed in the syntax analysis and semantic analysis stages, but the use of the symbol table sometimes continues to the running stage of the target code.
During the compilation process, after confirming the syntax and semantics of the source program, it can be translated and the internal representation of the source program changed at the same time. For declaration statements, it is necessary to record information about the symbols encountered, so the symbol table should be filled in and checked. For executable statements, they need to be translated into intermediate code or target code.

During the process of compiling a high-level language source program, the compiler must continuously collect, record and use information such as the types and characteristics of some related symbols in the source program, and store it in (22). (First half of 2014)
(22)
A. Symbol table B. Hash table
C. Dynamic lookup table D. Stack and queue

Compilation is a way to implement high-level programming languages. The compilation process can be divided into stages such as lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization and target code generation. Error handling and symbol table management are also required. The function of the symbol table is to record the necessary information of each symbol in the source program to assist in semantic correctness checking and code generation. During the compilation process, the symbol table needs to be quickly and efficiently searched, inserted, modified, and deleted. The establishment of the symbol table can start from the lexical analysis stage, or can be placed in the syntax analysis and semantic analysis stages, but the use of the symbol table sometimes continues to the running stage of the target code.

In the process of compiling or interpreting high-level language source programs, it is necessary to continuously collect, record and use information such as the types and characteristics of some related symbols in the source program, and store it in (22). (First half of 2019)
(22) A. Hash table B. Symbol tableC. Stack D. Queue

The function of the symbol table is to record the necessary information of each symbol in the source program to assist in semantic correctness checking and code generation. During the compilation process, the symbol table needs to be quickly and efficiently searched, inserted, modified, and deleted. The establishment of the symbol table can start from the lexical analysis stage, or can be placed in the syntax analysis and semantic analysis stages, but the use of the symbol table sometimes continues to the running stage of the target code.

In the process of compiling high-level programming languages, use (21) to record the necessary information of each character in the source program to assist in semantic correctness checking and code generation. (Second half of 2021)
(21) A. Decision table B. Symbol tableC. Generalized table D. Index table

The function of the symbol table is to record the necessary information of each symbol in the source program to assist in semantic correctness checking and code generation. During the compilation process, the symbol table needs to be quickly and efficiently searched, inserted, modified, and deleted. The establishment of the symbol table can start from the lexical analysis stage, or can be placed in the syntax analysis and semantic analysis stages, but the use of the symbol table sometimes continues to the running stage of the target code.

Guess you like

Origin blog.csdn.net/weixin_50843918/article/details/134942262