deal with recursion problems by determining the shortest resolvable reference
d0c-s4vage opened this issue · 0 comments
d0c-s4vage commented
Grammar rules that generate lists work well for parsing, but are a pain when using them to generate data. E.g. from the python 2.7 grammar, there's the fpdef
and fplist
rules. Currently gramfuzz almost always runs into recursion errors when building the fpdef
and fplist
rules:
fpdef: NAME | '(' fplist ')'
fplist: fpdef (',' fpdef)* [',']
gramfuzz should be able to process all defined rules in a category and determine its distance from a leaf node, as well as each option inside an Or
to determine which option gives the shortest resolvable path. This can then be used to determine the shortest-path to generating a rule without chancing recursion errors.