Commit a1ef62a3 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Completed Herculean task: DMT statically type-safe

parent f48ce6ba
......@@ -185,12 +185,18 @@ types). This used to cover Dumpable C/Ada Types and OG headers.'''
def main() -> None:
if "-v" in sys.argv:
import pkg_resources
version = pkg_resources.require("dmt")[0].version
print("aadl2glueC v" + str(version))
sys.exit(1)
if sys.argv.count("-o") != 0:
idx = sys.argv.index("-o")
try:
commonPy.configMT.outputDir = os.path.normpath(sys.argv[idx + 1]) + os.sep
except: # pragma: no cover
panic('Usage: %s [-verbose] [-useOSS] [-o dirname] input1.aadl [input2.aadl] ...\n' % sys.argv[0]) # pragma: no cover
panic('Usage: %s [-v] [-verbose] [-useOSS] [-o dirname] input1.aadl [input2.aadl] ...\n' % sys.argv[0]) # pragma: no cover
del sys.argv[idx]
del sys.argv[idx]
if not os.path.isdir(commonPy.configMT.outputDir):
......@@ -207,7 +213,7 @@ def main() -> None:
# No other options must remain in the cmd line...
if len(sys.argv) < 2:
panic('Usage: %s [-verbose] [-useOSS] [-o dirname] input1.aadl [input2.aadl] ...\n' % sys.argv[0]) # pragma: no cover
panic('Usage: %s [-v] [-verbose] [-useOSS] [-o dirname] input1.aadl [input2.aadl] ...\n' % sys.argv[0]) # pragma: no cover
commonPy.configMT.showCode = True
for f in sys.argv[1:]:
if not os.path.isfile(f):
......
......@@ -212,6 +212,12 @@ Where <files> is a list of ASN.1 and ACN files, and options can be:
def main():
if "-v" in sys.argv:
import pkg_resources
version = pkg_resources.require("dmt")[0].version
print("asn2aadlPlus v" + str(version))
sys.exit(1)
global g_keepFiles
global g_privateHeapSize
......
......@@ -60,6 +60,12 @@ def usage(argsToTools: Dict[str, str]) -> None:
def main() -> None:
if "-v" in sys.argv:
import pkg_resources
version = pkg_resources.require("dmt")[0].version
print("asn2dataModel v" + str(version))
sys.exit(1)
argsToTools = {
'toOG': 'OG',
'toSCADE5': 'SCADE5',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment