3

I've been tasked to come up with some half-year and full-year university projects for IT students and, due to the fact that it's hopefully never been done before (and also that I harbor certain sadistic tendencies), one of them is adding a BCPL front-end compiler to the GCC suite.

Where can I locate one or more of:

  • some good reference-type documentation describing how to add such a beast to GCC?
  • an example of doing so, for a simple language.
  • any guides to the process.
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953

2 Answers2

4

Go-lang's gccgo is a Go front end for gcc. Here is the announcement. I have not studied enough of Go to comment about its complexity or simplicity. I hope for someone prepared to write a front end for gcc, gccgo should be a decent reference and/or example.

vpit3833
  • 7,817
  • 2
  • 25
  • 25
  • I don't think the asker wants source code as the answer to his/her question. Otherwise, he/she can just pull the gcc source code and reads the content of gcc folder. – Aldian Fazrihady Nov 26 '20 at 04:50
0

https://www.tldp.org/HOWTO/GCC-Frontend-HOWTO.html is very old.

https://www.linuxjournal.com/article/7884 is also very old.

https://thinkingeek.com/2016/01/05/tiny-gcc-front-part-1/ and https://thinkingeek.com/2016/01/06/tiny-gcc-front-part-2/ are much more recent.

I haven't read any of them.

Jonathan Wakely
  • 166,810
  • 27
  • 341
  • 521