Initial commit

This commit is contained in:
2024-11-14 19:16:08 -05:00
commit 4f0091f23f
18 changed files with 2277 additions and 0 deletions

20
lexer_gen/main.odin Normal file
View File

@@ -0,0 +1,20 @@
package lexer_gen
import "core:os"
import "core:fmt"
main :: proc() {
if len(os.args) < 2 {
// TODO
return
}
buf, ok := os.read_entire_file_from_filename(os.args[1])
if !ok {
// TODO
return
}
tokenizer := tokenize(buf)
parser := parse_token_stream(tokenizer)
print_parse_tree(parser)
fmt.print('\n')
}