]> thyrsus.com Git - mad.git/commitdiff
Added -g option.
authorEric S. Raymond <esr@thyrsus,com>
Fri, 23 Jan 2004 19:51:46 +0000 (19:51 +0000)
committerEric S. Raymond <esr@thyrsus,com>
Fri, 23 Jan 2004 19:51:46 +0000 (19:51 +0000)
mad

diff --git a/mad b/mad
index 6aedb7959253cfae6354dc36ae75d36280b79256..ee2b0e70f641d5b18902271c4514027b85798601 100755 (executable)
--- a/mad
+++ b/mad
@@ -539,13 +539,16 @@ if __name__ == '__main__':
     import os, getopt
     mad_debug = 0
     binary = True
+    dump_tuples = False
     target = None
-    (options, arguments) = getopt.getopt(sys.argv[1:], "cd:o:")
+    (options, arguments) = getopt.getopt(sys.argv[1:], "cd:go:")
     for (opt, val) in options:
         if opt == '-c':
             binary = False
         elif opt == '-d':
             mad_debug = int(val)
+        elif opt == '-g':
+            dump_tuples = True
         elif opt == '-o':
             target = val
 
@@ -576,6 +579,11 @@ if __name__ == '__main__':
 
     # Perform global analysis
     analyze(deck)
+
+    if (dump_tuples):
+        for t in deck:
+            print t
+
     # Generate code
     if arguments == ['-']:
         generate(sys.stdout)