Skip to content
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: tokenizing hello world #232

Merged
merged 18 commits into from
Feb 24, 2023
Merged

Self-hosted compiler: tokenizing hello world #232

merged 18 commits into from
Feb 24, 2023

Conversation

Akuli
Copy link
Owner

@Akuli Akuli commented Feb 24, 2023

The first part of #116

This PR creates a tokenizer written in Jou. It tokenizes the hello world program in exactly the same way as the Jou compiler written in C.

I also added a test script that attempts to tokenize all Jou files with both tokenizers and compares the results.

self_hosted/tokenizer.jou Show resolved Hide resolved
self_hosted/tokenizer.jou Outdated Show resolved Hide resolved
self_hosted/tokenizer.jou Show resolved Hide resolved
self_hosted/tokenizer.jou Show resolved Hide resolved
self_hosted/tokenizes_wrong.txt Outdated Show resolved Hide resolved
src/jou_compiler.h Outdated Show resolved Hide resolved
src/tokenize.c Outdated Show resolved Hide resolved
stdlib/io.jou Outdated Show resolved Hide resolved
stdlib/mem.jou Show resolved Hide resolved
@Akuli Akuli merged commit 19e97a6 into main Feb 24, 2023
@Akuli Akuli deleted the selfhosted branch February 24, 2023 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant