20 lines
371 B
Odin
20 lines
371 B
Odin
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')
|
|
} |