Initial commit
This commit is contained in:
20
lexer_gen/main.odin
Normal file
20
lexer_gen/main.odin
Normal 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')
|
||||
}
|
||||
Reference in New Issue
Block a user