import sys
from crymp import *

def help(out):
  # XXX
  out.write('help()\n')
  out.write(Options.help())

def version(out):
  # XXX
  out.write('version()\n')

def init():
  # XXX
  Options.skel = skel.Skel(Options.skel_filename)
  pass

def process(filename):
  """Process the input file.

  :Parameters:
    - `filename`: The name of the input C++ file.
  """

  f = file(filename, 'r')
  buffer = f.read()
  f.close()

  parse.PBlock.process(buffer, filename)

def cleanup():
  # XXX
  pass

def main():
  args = Options.parse(sys.argv[1:])

  init()
  for arg in args: process(arg)
  output.output()
  cleanup()
  return

