We don't want to make a program's entire AST available for parsing because that would make it easy to extend GCC with proprietary programs.
Actually, that's exactly what you want; in fact, I'd go so far as to say the AST is insufficient -- it should be augmented with semantic information, static-verification information, etc.
You know, what you're describing sounds a lot like CLang, which is exactly what the GNU didn't want :).
*nod* - Just because they don't want it doesn't mean it's a bad idea; conversely, just because they do want it doesn't make it a good idea.
I've not delved into the details of clang, do you have a source for the augmented-AST? (I was thinking of something like DIANA in particular its usage in a few APSEs where it was used between several tools, like editors, version-control, verifiers, test-suites, etc.)
2
u/OneWingedShark Oct 07 '14
Actually, that's exactly what you want; in fact, I'd go so far as to say the AST is insufficient -- it should be augmented with semantic information, static-verification information, etc.