# Path: fparser/script_options.py
# def set_f2003_options(parser):
#     parser.set_usage('''\
# %prog [options] <Fortran files>
# 
# Description:
#   %prog parses Fortran codes using Fortran 2003 syntax rules.''')
#     parser.add_option('--task',
#                       default = 'show',
#                       choices = ['show', 'none'],
#                       help = 'Specify parsing result task. Default: %default.'
#                       )
#     parser.add_option_group(get_fortran_code_group(parser))


import os
import sys
    from iocbio.optparse_gui import OptionParser
    from optparse import OptionParser
from fparser.script_options import set_f2003_options
    from fparser.api import Fortran2003
    from fparser.readfortran import  FortranFileReader
from __future__ import absolute_import
from __future__ import print_function
#!/usr/bin/env python
### START UPDATE SYS.PATH ###
### END UPDATE SYS.PATH ###
try:
except ImportError:

def runner (parser, options, args):
    for filename in args:
        reader = FortranFileReader(filename)
        if options.mode != 'auto':
            reader.set_mode_from_str(options.mode)
        try:
            program = Fortran2003.Program(reader)
            print(program)
        except Fortran2003.NoMatchError as msg:
            print('parsing %r failed at %s' % (filename, reader.fifo_item[-1]))
            print('started at %s' % (reader.fifo_item[0]))
            print('quiting')
            return

def main ():
    parser = OptionParser()

# Path: fparser/script_options.py
# def set_f2003_options(parser):
#     parser.set_usage('''\
# %prog [options] <Fortran files>
# 
# Description:
#   %prog parses Fortran codes using Fortran 2003 syntax rules.''')
#     parser.add_option('--task',
#                       default = 'show',
#                       choices = ['show', 'none'],
#                       help = 'Specify parsing result task. Default: %default.'
#                       )
#     parser.add_option_group(get_fortran_code_group(parser))


# Path: fparser/scripts/f2003.py
import os
import sys
    from iocbio.optparse_gui import OptionParser
    from optparse import OptionParser
from fparser.script_options import set_f2003_options
    from fparser.api import Fortran2003
    from fparser.readfortran import  FortranFileReader

from __future__ import absolute_import
from __future__ import print_function
#!/usr/bin/env python
### START UPDATE SYS.PATH ###
### END UPDATE SYS.PATH ###
try:
except ImportError:

def runner (parser, options, args):
    for filename in args:
        reader = FortranFileReader(filename)
        if options.mode != 'auto':
            reader.set_mode_from_str(options.mode)
        try:
            program = Fortran2003.Program(reader)
            print(program)
        except Fortran2003.NoMatchError as msg:
            print('parsing %r failed at %s' % (filename, reader.fifo_item[-1]))
            print('started at %s' % (reader.fifo_item[0]))
            print('quiting')
            return

def main ():
    parser = OptionParser()

    set_f2003_options(parser)