GCC front-ends
GCC front-ends
Posted Jan 1, 2025 18:30 UTC (Wed) by jklowden (subscriber, #107637)In reply to: GCC front-ends by ibukanov
Parent article: An Algol 68 front end for GCC
Those years ago, I wanted to use clang to parse C++, and write the metadata to a database. I left with the sense that it might be possible, but I'd have to write the manual first.
(I still *do* want to write that tool. It would underpin a source-code navigation tool for C++, something that doesn't exist for large code bases. We have C-based tools like GNU Global and cscope, and I remember using a web-based text-search engine, but nothing that could distinguish open(2) from std::stream::open(), or report the call stack that modifies a variable.)
The GCC Internals manual runs some 800 pages. Even at that, the 10% of that document devoted to front-end development woefully inadequate; after all, the ISO COBOL specification is 1280 pages, and it describes only one language. But that document, plus a tutorial example, gave us a toehold. Within a week we had the "hello world" version of a COBOL compiler. Then it was just a quick 8 or so man-years of work.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
