dis6 - CMPSC 160 Translation of Programming Languages...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CMPSC 160 Translation of Programming Languages Project 4 Type Checking Introduction Projects Calculator (10%) Lexical and Syntax Analysis (20%) Abstract Syntax Tree (20%) Type Checking and Semantic Analysis (25%) Code Generation (25%) Environment Linux C/C++ Lex and Yacc Project Goal To analyze semantic properties of a Simple program To perform type checking Undefined / Duplicated ID Unmatched Operands No or more than two main func Tour of the Code Steps to Solve the Challenge Understand how to traverse an AST using the visitor pattern As an example look at ast2dot.cpp Also look at the slides from lecture 10 about the AST implementation Understand what/when/where to check For each AST node, you need to figure out what to check. Should you check before or after visiting children? Most of the time you check conditions about a node after visiting its children....
View Full Document

Page1 / 11

dis6 - CMPSC 160 Translation of Programming Languages...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online