CISC 471 First Exam Review Game Questions. Overview 1. Draw the standard phases of a compiler for compiling a high level language to machine code, showing the input and output forms for each phase. Overview 2.
b | c
Show an equivalent Context free grammar for the regular expression:
S -> (A | B)* BA|C
A -> DA | w
B -> w | x
C -> CD | D
D -> y
S-> (L) | a
L-> L,S | S
Explain the difference between an abstract syntax tree and a concrete syntax tree and justify why most compilers use abstract syntax trees.
Explain and show an example of two properties of grammars that cause problems for topdown parsers, and require rewrites or special rules in the yacc file.
Name the two different ways that are used to build top-down parsers.
Write the recursive descent routine for the following nonterminal:
D -> D , id | id | ε
Explain the actions of an LR bottom up parser for:
Explain how the parser determines the state to put back on top of the stack after a Reduce.
Show the attributed tree for -101 with the rules: