MCPcopy Create free account
hub / github.com/geekcomputers/Python / main

Function main

Assembler/assembler.py:1313–1329  ·  view source on GitHub ↗

reads textfiles from the command-line and interprets them.

()

Source from the content-addressed store, hash-verified

1311
1312# main program
1313def 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
1332if __name__ == "__main__":

Callers 1

assembler.pyFile · 0.70

Calls 5

resetInterpreterFunction · 0.85
loadFileFunction · 0.85
scanFunction · 0.85
registerLabelsFunction · 0.85
parserFunction · 0.85

Tested by

no test coverage detected