instaparse
instaparse copied to clipboard
Create a log of the grammar paths take an attach as metadata to top of result
This proposed change keeps track of all the paths take through the grammar during parsing. I'm using instaparse with this change to analyze a corpus of test cases and then use test.check to generate new tests cases that are probabilistically "similar" to the corpus. I use the path log to create a weight file for my test.check generators.
I don't necessarily consider this in final form but it's currently working for me so I'm creating this PR to get feedback/discussion.
I know that performance behavior of instaparse is critical. Do you have performance tests that I could use to test this change to characterize what impact if any it has on performance?