diff --git a/cfg_utils.py b/cfg_utils.py index 0aba7218522e3bd1b1c7f946d8534a7ee9483181..0cd05ed45758961a0838031ed876305291ee381b 100644 --- a/cfg_utils.py +++ b/cfg_utils.py @@ -569,9 +569,7 @@ class CFGBoltzmann: print(" "* depth + "GPRIM arguments are", nonterminal_index, chosen_production, how_far_into_the_RHS, exact_length_total) # first, handle the ultimate degenerate case: - if (exact_length_total == 0): - print(" "* depth +"XXXXXXXXXXXXXXXXXXX LENGTH ZERO RETURNING []") - return [] + assert(exact_length_total != 0) # The case analysis hinges on what is at X_ijk. @@ -651,7 +649,7 @@ z = CFGBoltzmann(rules, list_of_nonterminals, list_of_terminals) rulepack_cooked = z.preprocessor() -qq = z.Gzero_shimmed(nonterminals.EXPRESSION, 13) +qq = z.Gzero_shimmed(nonterminals.EXPRESSION, 11) print ("AND THE FINAL ANSWER IS","\n\n\n",qq, "\n\n\n") # Furthermore, we also note that the description of a context-free grammar is *itself* context-free