Skip to content

Commit 5c83790

Browse files
authored
Add files via upload
1 parent 7f38207 commit 5c83790

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ParserGenerator.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@ public void GenerateLR1()
421421
foreach (var r in FOLLOW[i])
422422
if (rule.Last().index > 0)
423423
FOLLOW[rule.Last().index].Add(r);
424+
425+
#if true
426+
print_hs(FIRST, "FIRST");
427+
print_hs(FOLLOW, "FOLLOW");
428+
#endif
424429
// --------------------------------------------------------
425430

426431
// (state_index, (production_rule_index, sub_productions_pos, dot_position, (lookahead))
@@ -682,6 +687,11 @@ public void GenerateLALR()
682687
foreach (var r in FOLLOW[i])
683688
if (rule.Last().index > 0)
684689
FOLLOW[rule.Last().index].Add(r);
690+
691+
#if true
692+
print_hs(FIRST, "FIRST");
693+
print_hs(FOLLOW, "FOLLOW");
694+
#endif
685695
// --------------------------------------------------------
686696

687697
// (state_index, (production_rule_index, sub_productions_pos, dot_position, (lookahead))

0 commit comments

Comments
 (0)