From c011c1b819c62230b10daf63f326ba3a6adc18e0 Mon Sep 17 00:00:00 2001 From: sunyinqi0508 Date: Fri, 26 Feb 2021 22:20:27 +0800 Subject: [PATCH] Update WORKLOG.md --- WORKLOG.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 3386e5e..34839e8 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -1,19 +1,19 @@ -Compiler Construction PA1 Worklog +# Compiler Construction PA1 Worklog
-
Team: +## Team:
Apoorva Ranade(ar6496)
Sanjar Ahmadov(sa5640)
Yinqi Sun(ys3540)

-
Indentation: -
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. +## Indentation: + - 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.
-
Challenges: -
- 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. -
- Handling errors was another challenge. This required debugging and small changes to program flow. -
- Understanding the giving code was a small challenge and took some time before we could start coding. -
-
Improvements: -
- Added more tests to rigorously check program flow and indentation. -
- Support for multi-line strings. +## Challenges: + - 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. + - Handling errors was another challenge. This required debugging and small changes to program flow. + - Understanding the giving code was a small challenge and took some time before we could start coding. + +## Improvements: + - Added more tests to rigorously check program flow and indentation. + - Support for multi-line strings.