Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As I see it, the point of bootstraping a compiler is to develop a compiler in stages and that it doesnt require you to implement the full compiler in the original language.

For example, let's say you create a new language called Brute. You decide to write it in C (original language).

Stage 1: Create a Brute compiler in C, which can compile only a small subset of Brute language. Lets call it bruteC compiler.

Stage 2: Implement a compiler in Brute lang and compile it using your bruteC compiler. This produces brute-compiler executable.

Stage 3: Add new feature to your brute compiler source code and compile it using your brute-compiler executable, which produces new brute-compiler executable.. .

And so on... At the end your brute-compiler supports all language features and thus is self hosted.



Nice, thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: