Skip to content

Commit 7f38207

Browse files
authored
Add files via upload
1 parent 72b88cb commit 7f38207

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ParserGenerator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,8 @@ public ShiftReduceParser CreateShiftReduceParserInstance()
12761276
{
12771277
var index = elem.Item1;
12781278
if (index == -1) index = production_rules.Count;
1279+
if (jump_table[reduce.Key][index] != 0)
1280+
throw new Exception($"Error! Shift-Reduce Conflict is not solved! Please use LALR or LR(1) parser!\r\nJump-Table: {reduce.Key} {index}");
12791281
if (elem.Item2 == 0)
12801282
jump_table[reduce.Key][index] = 3;
12811283
else

0 commit comments

Comments
 (0)