[RFE][patch] improve orcc reporting
Submitted by Francesco Romani
Link to original bug (#748334)
Description
Created attachment 302184
patches as tgz
I played with orcc some time ago, and hit a crash caused by incorrect input.
While debugging my issue, I found the orcc output too terse and not very friendly. So, I took the chance and spent some days hacking the parser sources (orcparse.c). It started with a few hacks, and I ended up rewriting a good part of it:
- new richer parsing API
- overhauled internal structure with massive modularization and cleanup
- richer error reporting
- more strict checking
- new orcc option to do just the parsing
- abort on parsing failed, instead of going ahead blindly and see the bytecode emitter crash
This code was rotting on my github account from some time, so I thought it would be of some good here, maybe.
Please find attach the resulting 36 patches (yes, thirty-six), made with git format-patch.
I intentionally made the small trying to make review easy.
Each patch should leave the code working as good practice mandates, but IMHO those are better merged as a whole, if that would be the case.
Commit message may be terse, maybe too much. Quite often the patch title self-explanatory, hopefully it actually is so.
github repo, for reference: https://github.com/mojaves/orc
Attachment 302184, "patches as tgz":
orcc_refactoring.tgz