You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
1.1 KiB
17 lines
1.1 KiB
# Compiler Construction PA2 Worklog
|
|
|
|
## Team:
|
|
**Apoorva Ranade**(ar6496) **Sanjar Ahmadov**(sa5640) **Yinqi Sun**(ys3540)
|
|
<br>
|
|
|
|
## Passes:
|
|
- First Pass: Creates the symbol tables and adds all the elements of the program to the symbol table. The first step is creating the basic table symbol, which is the parent(root) of the symbol table structure(which forms a tree-like structure). Classes for Object, int, bool and str are added to this symbol table. This table contains the global declarations. At each level of scope, we create a symbol table which points to the parent symbol table. Variables, functions and classes are added to the appropriate symbol table according to the scope.
|
|
- Second Pass: At each node of the abstract syntax tree, the types are identified and populated.
|
|
## Recovery:
|
|
-
|
|
|
|
## Challenges:
|
|
- Nested structures were a challenge. A function inside a function needs to handle variable references as well as ensure function calls have appropriate scope.
|
|
## Improvements:
|
|
- Added more tests to rigorously check program flow and indentation.
|