❯ ./main
ls -l t*
Type: WORD Position: 0 Literal: ls Lexeme: ls
Type: WORD Position: 3 Literal: -l Lexeme: -l
Type: WORD Position: 6 Literal: tokenize.c Lexeme: t*
Type: WORD Position: 17 Literal: tokenize.h Lexeme: t*
[4 token(s)]
-rw-r--r-- 1 user user 681 Aug 14 22:22 tokenize.c
-rw-r--r-- 1 user user 657 Aug 14 23:33 tokenize.h
Parses commands using recursive descent
-l
Lexeme: WORD Position: 0 Literal: -l
[1 token(s)]
Error: Argument list must be preceded by a command.
-l
Lexeme: WORD Position: 0 Literal: -l
[1 token(s)]
Error: Argument list must be preceded by a command.
ls -l
Lexeme: WORD Position: 0 Literal: ls
Lexeme: WORD Position: 3 Literal: -l
[2 token(s)]
Recognizes types
echo 12.2
Lexeme: WORD Position: 0 Literal: echo
Lexeme: NUMBER Position: 5 Literal: 12.2 Value: 12.200000
[2 token(s)]
12.2