Is your feature request related to a problem? Please describe.
I sometimes need to parse fragments of files that are complete subtrees.
Describe the solution you'd like
ParserParsers for all rules?
Describe alternatives you've considered
I can add fake text around the fragment to turn it into a valid full document, but this messes with line numbers and if the user supplied a non-fragment it could end up making the error messages confusing (referring to input that the user didn't originally supply).
Additional context
Maybe this is already possible... I dug around and didn't see an obvious way to do it. The only ParserParser generated seems to be for the root of the grammar and I didn't see a simple way to set up the state for other rules.
Is your feature request related to a problem? Please describe.
I sometimes need to parse fragments of files that are complete subtrees.
Describe the solution you'd like
ParserParsers for all rules?Describe alternatives you've considered
I can add fake text around the fragment to turn it into a valid full document, but this messes with line numbers and if the user supplied a non-fragment it could end up making the error messages confusing (referring to input that the user didn't originally supply).
Additional context
Maybe this is already possible... I dug around and didn't see an obvious way to do it. The only
ParserParsergenerated seems to be for the root of the grammar and I didn't see a simple way to set up the state for other rules.