QUESTIONS AND ANSWERS (GRADED
A+)
Syntax Analyzer - ANSWER-Checks the program for syntax errors. Collects lexemes
into parse trees.
Parser - ANSWER-What is another name for Syntax Analyzer?
Deterministic Finite Automata (DFA) - ANSWER-Flowchart with an initial state, error
state and a accepting state with various states along the way to test if pattern matches.
Recognizer - ANSWER-What is another name for Deterministic Finite Automata (DFA)?
Lexical Analyzer - ANSWER-Scans the source code from left-to-right, character-by-
character, and groups these characters into lexemes (sequence of characters that
match a pattern), and outputs a sequence of tokens.
Lexical Analyzer output - ANSWER-Outputs a sequence of tokens to syntax analyzer
Scanner - ANSWER-Another name for Lexical Analyzer.
Syntax Error - ANSWER-mistakes in using the language. Examples are missing a
comma or a quotation mark, or misspelling a word.
Syntax - ANSWER-Structure of a program
Semantics - ANSWER-Meaning of the program
Static Semantics - ANSWER-rules that can be check at compile time
Runtime Semantics - ANSWER-rules that can be checked only at run time
Semantic Analyzer - ANSWER-takes input from Syntax Analyzer in the form of parse
trees. Determines if the input has a well-defined meaning. Concerned with type
checking and type coercion based on type rules.
Type Checking - ANSWER-the activity of ensuring that the operands of an operator are
of compatible types
Lexical Error - ANSWER-is a mistake in lexeme (e.g., typing "esle" instead of "else" or
missing off one of the quotes in a literal string)