Closed d-u-d-e closed 1 week ago
I'm not able to test the lexer because when I run: ./test_compiler ../compiler_driver.py --chapter 1 --stage lex
I get:
Traceback (most recent call last):
File "/home/morga/repos/c-compiler/writing-a-c-compiler-tests/test_framework/basic.py", line 592, in test_valid
self.compile_success(program)
File "/home/morga/repos/c-compiler/writing-a-c-compiler-tests/test_framework/basic.py", line 359, in compile_success
self.assertEqual(
AssertionError: compilation of /home/morga/repos/c-compiler/writing-a-c-compiler-tests/tests/chapter_1/valid/tabs.c failed with error:
/usr/bin/env: ‘python3\r’: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines
Writing #!/usr/bin/env -S python3
should do the trick.
See https://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-for-awk-with-a-shebang-i-e.