From 534b043c62d1b0d6ff38dea2fed42a9cd233d2be Mon Sep 17 00:00:00 2001 From: ar6496 <78793916+ar6496@users.noreply.github.com> Date: Mon, 22 Feb 2021 20:02:16 +0530 Subject: [PATCH] Update WORKLOG.md --- WORKLOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WORKLOG.md b/WORKLOG.md index 612c819..72ea5a9 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -11,7 +11,10 @@ Compiler Construction PA1 Worklog
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: Describe any challenges (besides indentation) you encountered and the way you solved them. Mention the approaches that did not work, if any. -
+
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: Describe any improvements you introduced that were not strictly necessary to pass the tests, such as implementing additional functionality, adding new tests, or enabling static analysis.
Added more tests to rigorously check program flow and indentation. +
Function body must have atleast oone statement which is not a part of a nested function.