3 ms·
As someone who at one time wrote a parser for the error output of gcc, clang AND cl, I can only upvote this tenfold. It was a minor nightmare with a ton of spec
by random_upvoter 5y ago
As someone who at one time wrote a parser for the error output of gcc, clang AND cl, I can only upvote this tenfold. It was a minor nightmare with a ton of special cases, and the final result was a heuristic rather than a formally sound method. Even determining which lines of the output belonged to the same error message was a challenge. Suffice to say that no fun was had.
- ghoward 5y agoThank you for this. I am writing a compiler, and I have never thought about this before. I'll make sure my compiler can do this. Any format you have a preference for?
- random_upvoter 5y agoGreat that you would consider this! The format doesn't matter all that much to me... JSON is the thing of the moment, seems the most obvious choice. XML would be fine too.
- ghoward 5y agoSounds great. Maybe I'll do multiple because each person has their own preference. I mean, it shouldn't be that hard to do multiple...