Skip to content

Commit

Permalink
Fix generation of empty productions for genEBNF
Browse files Browse the repository at this point in the history
  • Loading branch information
mingodad committed Jul 16, 2023
1 parent 1d09221 commit 8aa81d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lalr/Grammar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ void Grammar::genEBNF()
}
}
else {
if(production_continuation) {
production_continuation = false;
printf("\n%s\t| ", prefix);
}
printf("/*empty*/");
}
if(production->precedence_symbol()) {
Expand Down

0 comments on commit 8aa81d2

Please sign in to comment.