Skip to content

Commit

Permalink
Fix the bug causing issue #171
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeTheLightning committed Jan 2, 2024
1 parent 8bf6898 commit 5c234ab
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/beta/code/GeneratorGrammarFuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ def choose_tree_expansion(self, tree: DerivationTree,
print("Expandable child #%d %s has order %d" %
(k, expandable_child[0], given_order[j]))

if min_given_order is None or given_order[j] < min_given_order:
if min_given_order is None or given_order[j] < given_order[min_given_order]:
min_given_order = k

assert min_given_order is not None
Expand Down
4 changes: 2 additions & 2 deletions docs/beta/notebooks/GeneratorGrammarFuzzer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3506,7 +3506,7 @@
" print(\"Expandable child #%d %s has order %d\" %\n",
" (k, expandable_child[0], given_order[j]))\n",
"\n",
" if min_given_order is None or given_order[j] < min_given_order:\n",
" if min_given_order is None or given_order[j] < given_order[min_given_order]:\n",
" min_given_order = k\n",
"\n",
" assert min_given_order is not None\n",
Expand Down Expand Up @@ -5031,4 +5031,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion docs/code/GeneratorGrammarFuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ def choose_tree_expansion(self, tree: DerivationTree,
print("Expandable child #%d %s has order %d" %
(k, expandable_child[0], given_order[j]))

if min_given_order is None or given_order[j] < min_given_order:
if min_given_order is None or given_order[j] < given_order[min_given_order]:
min_given_order = k

assert min_given_order is not None
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/GeneratorGrammarFuzzer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3506,7 +3506,7 @@
" print(\"Expandable child #%d %s has order %d\" %\n",
" (k, expandable_child[0], given_order[j]))\n",
"\n",
" if min_given_order is None or given_order[j] < min_given_order:\n",
" if min_given_order is None or given_order[j] < given_order[min_given_order]:\n",
" min_given_order = k\n",
"\n",
" assert min_given_order is not None\n",
Expand Down Expand Up @@ -5031,4 +5031,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion notebooks/GeneratorGrammarFuzzer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@
" print(\"Expandable child #%d %s has order %d\" %\n",
" (k, expandable_child[0], given_order[j]))\n",
"\n",
" if min_given_order is None or given_order[j] < min_given_order:\n",
" if min_given_order is None or given_order[j] < given_order[min_given_order]:\n",
" min_given_order = k\n",
"\n",
" assert min_given_order is not None\n",
Expand Down

0 comments on commit 5c234ab

Please sign in to comment.