Skip to content

Commit 940115e

Browse files
committed
Merge branch 'Marcell' into Toby
2 parents d70cbb4 + 13c9a49 commit 940115e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Assignment2/src/com/company/SyntacticAnalyser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public static ParseTree parse(List<Token> tokens) throws SyntaxException {
106106
put("ID",2);
107107
put("}}",3);
108108
put(";",2);
109+
put("while",2); // +
109110
put("}",3);
110111
put("for",2);
111112
put("if",2);
@@ -155,6 +156,7 @@ public static ParseTree parse(List<Token> tokens) throws SyntaxException {
155156
put("}}",20);
156157
put(";",20);
157158
put("while",20);
159+
put("}",20); // +
158160
put("for",20);
159161
put("if",20);
160162
put("else",19);
@@ -169,7 +171,7 @@ public static ParseTree parse(List<Token> tokens) throws SyntaxException {
169171
}});
170172
parseTable.put("Possif", new HashMap<String, Integer>() {{
171173
put("{",23);
172-
put("for",22);
174+
put("if",22); // for -> if
173175
put("",23);
174176
}});
175177
parseTable.put("Assign", new HashMap<String, Integer>() {{

0 commit comments

Comments
 (0)