packcc icon indicating copy to clipboard operation
packcc copied to clipboard

Error Recovery

Open adesutherland opened this issue 5 years ago • 2 comments

Hello!

Sorry for opening two "issues"- they are not really issues but relate to different topics!

What is your thinking concerning re-syncing after a parse/recognition error. I am thinking of a strategy of maybe trying to insert "the" missing token (rule, I guess), and then if that doesn't help immediately trying to find a sync point where the inputs meets a rule.

Happy to look at this - but what are your thoughts / advice / thinking on how relevant this might be for you and its feasibility?

Thanks

Adrian

adesutherland avatar Sep 10 '20 15:09 adesutherland

Sorry for my late reply. I agree with a need of 're-syncing'. However, it wouldn't be so easy to realize intrinsically by PackCC. I keep it in mind, but I cannot promise to realize it in the future.

arithy avatar Oct 10 '20 05:10 arithy

@adesutherland, I'm going to close this issue because 're-syncing' can be realized by the design of PEG and actions. There are many ways of 're-syncing' and they may be different depending on the design of parsers and the context during parsing. So, I cannot choose one from them to support it intrinsically by PackCC. If you have any objection against closing this issue, let me know by the end of this month (Aug. 2022).

arithy avatar Aug 09 '22 23:08 arithy