Compiler Concepts: Key Terms and Processes
1. Compilers: Software systems that translate code into a format a computer can run.
2. Interpreters: Another common type of speech processor.
3. Analysis and Synthesis: The compiler maps a source program into a semantically equivalent program. Few processes exist for this assignment.
4. Lexical Analysis: Divides the source program components and imposes structure on them. A grammatical part of the analysis.
5. Synthesis: Builds the desired target program from the intermediate representation and information from the symbol table.
6. Lexical Analyzer: Its main task is to read the characters in the input source program.
7. Scanning: Consists of simple processes that do not require the determination of input tokens.
8. Lexeme Patterns: A description of how tokens can be formed.
9. Example Tokens: IF
, ELSE
, etc.
10. Finite Automata: Consists of graphs like state transition diagrams, with some differences.
11. Semantic Analysis: Verifies that the meaning of what is read is correct.
12. Abstract Syntax Tree: A way to represent the theoretical output of the semantic analysis phase.
13. Static Verification: Checks the conformity of a system program and its specification without running code.
14. Abstract Syntax Trees: Used to handle the semantic information of code.
15. Grammars: Consist of terminals, nonterminals, a start symbol, and context-free productions.
16. Grammar Productions: Specify how terminals can be combined to form non-terminal strings.
17. Ambiguous Grammar: A grammar that produces more than one parse tree from the left or right for the same statement.
18. Ambiguity in Grammars: For most parsers, it is desirable that the grammar does not have ambiguities.
19. BNF Notation: A way to write grammar productions.
20. Descendent Parsing: Parsing that considers seeking a referral to the left of an input string.
21. Symbol Table: Data structures used by compilers to store information about the construction of a source program.
22. Symbol Table Entries: Contain information about an identifier (such as string or lexeme).
23. Symbol Table Requirements: In general, symbol tables need to handle multiple statements for the same identifier.
24. Symbol Table Entry Creation: Identifiers create entries in the symbol table.
25. Scope of Declaration: A term that refers to the scope of a declaration of x.
26. Symbol Table Optimization: Benefits from its rule over nesting blocks of nearby symbols.
27. Nearest Nested Rule: Indicates that an identifier x is in the scope of the nearest nested block declaration of x.
28. Front End: The intermediate representation of the source program produced by the user interface.
29. Target Machine Architectures: Common target machine architectures.
30. Code Generation: The code generator must assign the program to an intermediate representation sequence of target machine code that can run. Two factors determine the complexity of this assignment.
31. Compiler Phases:
- Lexical Analysis: Receives input characters.
- Syntax Analysis: Checks if the instructions are spelled correctly.
- Semantic Analysis: Ensures the instruction has a logical sequence.
- Intermediate Code Generation: Generates code to test, nearly finished.
- Code Optimization: Removes or improves code for better testing.
- Code Generation: The final code is generated.