erikrose / parsimonious

The fastest pure-Python PEG parser I can muster
MIT License
1.79k stars 126 forks source link

Feature Request: Next Valid Token #229

Open mjspeck opened 1 year ago

mjspeck commented 1 year ago

How hard would it be to implement a method to get all valid follow-up tokens to an incomplete sequence? For example, let's say a valid string is alternating letters and numbers. If I provided the string "a", then the valid follow-up tokens would be {1,2,3,4,5,6,7,8,9,0}. Would this even be possible?