out.write('}\n')
if __name__ == '__main__':
+ import getopt
+ mad_debug = 0
+ (options, arguments) = getopt.getopt(sys.argv[1:], "d:")
+ print options
+ for (opt, val) in options:
+ if opt == '-d':
+ mad_debug = int(val)
+
source = sys.stdin.read()
# Grotty hack to add end-of-statement delimiters
source = re.sub('\n([A-Z]|\t)', ' ;\n\\1', source).rstrip() + ' ;\n'
# Parse
- yacc.parse(source)
+ yacc.parse(source, debug=mad_debug)
# Perform global analysis
analyze(deck)
# Generate code