Week 3
IRs, ILs and ASTs
- What is the difference between an Intermediate
Representation (IR) and an Intermediate Language (IL)? Is every IR an
IL? Is every IL an IR?
- Constructing an Abstract Syntax Tree (AST) with SableCC
can be a bit tedious as it requires the programmer to add actions to
the code. What would be the only alternative to this approach though,
if an AST is desired?
- Why may it be a viable solution to simply use a Concrete
Syntax Tree (CST) instead of an AST? (consider the "Visitor" Design
Pattern) What may be drawbacks of using a CST?
- SableCC automatically generates a pretty-printer along
with the parser, that prints the AST to the command line. Why does
bison not generate such a printer, too?
|