reads textfiles from the command-line and interprets them.
()
| 1311 | |
| 1312 | # main program |
| 1313 | def main(): |
| 1314 | """ |
| 1315 | reads textfiles from the command-line and interprets them. |
| 1316 | """ |
| 1317 | |
| 1318 | # [1:] because the first argument is the program itself. |
| 1319 | for arg in sys.argv[1:]: |
| 1320 | resetInterpreter() # resets interpreter mind |
| 1321 | |
| 1322 | try: |
| 1323 | loadFile(arg) |
| 1324 | scan() |
| 1325 | registerLabels() |
| 1326 | parser() |
| 1327 | |
| 1328 | except Exception as e: |
| 1329 | print(f"Error: {e}") |
| 1330 | |
| 1331 | |
| 1332 | if __name__ == "__main__": |
no test coverage detected