python-plus-plus/dump_tokens.py
2024-10-01 19:02:20 +10:00

10 lines
207 B
Python

import sys
from ppp_lexer import Lexer
from ppp_tokens import EofToken
_program, file_path = sys.argv
lexer = Lexer.from_file(file_path)
while not lexer.check_token(EofToken()): print(lexer.next_token())