Programming Quiz [closed]
- by arin-s-rizk
Hi one of my mates sent me this quiz see if you can guess the answers I will post mine later. In this quiz, some tasks related to the compilation process are listed. For each one of them, specify the part of the compiler that is responsible of performing it. Here are the possible answers:
Lexical analyzer
Parser
Semantic analyzer
None of the above
Just fill the right choice (the number only) in the blank after each task:
Checking that the parentheses in an expression are balanced _ _ _ _ _
Removing comments from the program _ _ _ _ _
Grouping input characters into "tokens" _ _ _ _ _
Reporting an error to the programmer about a missing (;) at the end of a C++ statement _ _ _ _ _
Checking if the type of the RHS (Right-Hand Side) of an assignment (=) is compatible with the LHS (Left-Hand Side) variable _ _ _ _ _
Converting the (AST) Abstract Syntax Tree into machine language _ _ _ _ _
Reporting an error about a strange character like '^' in a C++ program _ _ _ _ _
Optimizing the AST _ _ _ _ _