Compiler - Question and answer - 6

26. List the phases that constitute the front end of a compiler ?
Lexical and Syntactic analysis.
The creation of symbol table.
Semantic analysis.
Generation of intermediate code.

27. What is a Left factoring ?
Left factoring is a grammar transformation that is useful for producing a grammar suitable for predictive parsing.

28. What is Lexical Analysis ? 
Lexical Analysis (LA)  or Scanners reads the source program one character at a time, carving the source program into a sequence of automic units called tokens.

29. What is one-pass compiler ?
One-pass compiler is a compiler that passes through the parts of each compilation unit only once, immediately translating each part into its final machine code. This is in contrast to a multi-pass compiler which converts the program into one or more intermediate representations in steps between source code and machine code, and which reprocesses the entire compilation unit in each sequential pass.

30. What is a Predictive parsing ?
Predictive parsing is a special case of recursive descent parsing where no backtracking is required. The key problem of predictive parsing is to determine the production to be applied for a non-terminal in case of alternatives.
1 2 3 4 5 6 7 8