Update WORKLOG.md

master
sunyinqi0508 4 years ago committed by GitHub
parent b95bc53e66
commit c011c1b819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,19 +1,19 @@
Compiler Construction PA1 Worklog # Compiler Construction PA1 Worklog
<br> <br>
<br>Team: ## Team:
<br>Apoorva Ranade(ar6496) <br>Apoorva Ranade(ar6496)
<br>Sanjar Ahmadov(sa5640) <br>Sanjar Ahmadov(sa5640)
<br>Yinqi Sun(ys3540) <br>Yinqi Sun(ys3540)
<br> <br>
<br> <br>
<br>Indentation: ## Indentation:
<br>A stack is maintained by the lexer to keep track of indentations. A count is accumulated for the number of whitespace characters before the first token. If the count changes from the previous line count, a stack operation is performed. If count increases, another value is added to the stack. If count decreases, the topmost value is popped from the stack. - A stack is maintained by the lexer to keep track of indentations. A count is accumulated for the number of whitespace characters before the first token. If the count changes from the previous line count, a stack operation is performed. If count increases, another value is added to the stack. If count decreases, the topmost value is popped from the stack.
<br> <br>
<br>Challenges: ## Challenges:
<br> - Shift-reduce errors while parsing the grammar. One approach to fix is to change the grammar. We chose to fix this issue by adding a precedence as in the case of expr by adding right precedence for if and else. - Shift-reduce errors while parsing the grammar. One approach to fix is to change the grammar. We chose to fix this issue by adding a precedence as in the case of expr by adding right precedence for if and else.
<br> - Handling errors was another challenge. This required debugging and small changes to program flow. - Handling errors was another challenge. This required debugging and small changes to program flow.
<br> - Understanding the giving code was a small challenge and took some time before we could start coding. - Understanding the giving code was a small challenge and took some time before we could start coding.
<br>
<br>Improvements: ## Improvements:
<br> - Added more tests to rigorously check program flow and indentation. - Added more tests to rigorously check program flow and indentation.
<br> - Support for multi-line strings. - Support for multi-line strings.

Loading…
Cancel
Save