Week 3

IRs, ILs and ASTs

    1. What is the difference between an Intermediate Representation (IR) and an Intermediate Language (IL)? Is every IR an IL? Is every IL an IR?
    2. 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?
    3. 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?
    4. 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?

Maintained by Eric Bodden. [HOME]