add skeleton application
This commit is contained in:
parent
2b4de69ff8
commit
bcb1e6a6ff
22
jtlc
Executable file
22
jtlc
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
def main(argv):
|
||||||
|
parser = argparse.ArgumentParser(prog = 'jtlc',
|
||||||
|
description = "Josh's Toy Language Compiler")
|
||||||
|
parser.add_argument('-E', action = 'store_true',
|
||||||
|
help = 'Translate only; do not compile, assemble, or link')
|
||||||
|
parser.add_argument('-c', action = 'store_true',
|
||||||
|
help = 'Translate, compile, and assemble, but do not link')
|
||||||
|
parser.add_argument('-o', metavar = 'file', dest = 'output_file',
|
||||||
|
help = 'Output File')
|
||||||
|
parser.add_argument('sources', metavar = 'source',
|
||||||
|
nargs = '*', help = 'Input Source File')
|
||||||
|
args = parser.parse_args(argv[1:])
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main(sys.argv))
|
Loading…
x
Reference in New Issue
Block a user