Update WORKLOG.md

master
ar6496 4 years ago committed by GitHub
parent 75f4646161
commit 2bba267990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,7 +7,7 @@
<br> <br>
<br> <br>
## Indentation: ## 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. - 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. The file: src/main/jflex/chocopy/pa1/ChocoPy.jflex, lines from 100 to 182, contain the code for the same. Line 270 of the same file deals with additional dedents in case the input ends in an indented state.
## Challenges: ## 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. - 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.

Loading…
Cancel
Save