-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self-hosted compiler?!!?!?? #116
Comments
I have now written a tokenizer in Jou that is capable of tokenizing the hello world program. Here's how to run it (with the latest jou repository cloned,
Output:
You can also get the exactly same output with the original tokenizer written in C:
However, it does not tokenize all test files correctly. The next step would be to make the new tokenizer tokenize all files in exactly the same way as the old tokenizer. @littlewhitecloud Are you interested in working on the tokenizer? It should be pretty easy to finish it from here, because you can look at the C code in I made a script
|
How to work on the tokenizer? |
My workflow is typically:
|
Also, |
Ok |
So self-compiler is just the jou compiler made with jou? |
Maybe we can write a translator C to jou and we translator the compiler made in C and we can compiler the jou code that after conversion. Then we will get a compiler made in jou and as same as C compiler. |
Yes, the self-hosted compiler is just the compiler made with Jou. I have thought about auto-translating the C code, but I have discovered a lot of unclear error messages and compiler bugs when translating manually. I think it's a good test of how nice the compiler is to use. |
Any new progress on this? |
Not much. I haven't poured much time into this recently, as I am more focused on advent of code. |
i.e. a Jou compiler that compiles Jou code, and of course can compile itself.
progress:
jou
executable thatmake
produces is the self-hosted compilerFor now, the main way to develop the self-hosted compiler is running the
./compare_compilers.sh
script (previously namedtokenizers.sh
). It attempts to compile files with both compilers and compares the results. There are lists of various "known not working" files inself_hosted/
, and./compare_compilers.sh --fix
updates them automatically.The text was updated successfully, but these errors were encountered: