parameters: (args)
return_statement: return parser.parse_args(args)
docstring: Parse arguments
docstring_summary: Parse arguments
docstring_tokens: Parse arguments
function: def parse_args(args):
      """
      Parse arguments
      """
      parser = optparse.OptionParser()
  
      parser.add_option('--os', default=platform.system().lower(),
                        help='Set the target os (default %default)')
      parser.add_option('--cc', default='gcc',
                        help='Set the target compiler type (default %default)')
      parser.add_option('--cc-bin', default=None,
                        help='Set path to compiler')
      parser.add_option('--root-dir', metavar='D', default='.',
                        help='Set directory to execute from (default %default)')
  
      parser.add_option('--make-tool', metavar='TOOL', default='make',
                        help='Specify tool to run to build source (default %default)')
  
      parser.add_option('--extra-cxxflags', metavar='FLAGS', default=[], action='append',
                        help='Specify extra build flags')
  
      parser.add_option('--cpu', default=None,
                        help='Specify a target CPU platform')
  
      parser.add_option('--with-debug', action='store_true', default=False,
                        help='Include debug information')
      parser.add_option('--amalgamation', action='store_true', default=False,
                        help='Build via amalgamation')
      parser.add_option('--disable-shared', action='store_true', default=False,
                        help='Disable building shared libraries')
  
      parser.add_option('--branch', metavar='B', default=None,
                        help='Specify branch being built')
  
      parser.add_option('--add-travis-folds', action='store_true', default=False,
                        help='Add fold markers for Travis UI')
  
      parser.add_option('--dry-run', action='store_true', default=False,
                        help='Just show commands to be executed')
      parser.add_option('--build-jobs', metavar='J', default=get_concurrency(),
                        help='Set number of jobs to run in parallel (default %default)')
  
      parser.add_option('--compiler-cache', default=None, metavar='CC',
                        help='Set a compiler cache to use (ccache, sccache, clcache)')
  
      parser.add_option('--pkcs11-lib', default=None, metavar='LIB',
                        help='Set PKCS11 lib to use for testing')
  
      parser.add_option('--with-python3', dest='use_python3', action='store_true', default=None,
                        help='Enable using python3')
      parser.add_option('--without-python3', dest='use_python3', action='store_false',
                        help='Disable using python3')
  
      parser.add_option('--with-pylint3', dest='use_pylint3', action='store_true', default=True,
                        help='Enable using python3 pylint')
      parser.add_option('--without-pylint3', dest='use_pylint3', action='store_false',
                        help='Disable using python3 pylint')
  
      parser.add_option('--disable-werror', action='store_true', default=False,
                        help='Allow warnings to compile')
  
      parser.add_option('--run-under-gdb', dest='use_gdb', action='store_true', default=False,
                        help='Run test suite under gdb and capture backtrace')
  
      return parser.parse_args(args)
function_tokens: def parse_args ( args ) : parser = optparse . OptionParser ( ) parser . add_option ( '--os' , default = platform . system ( ) . lower ( ) , help = 'Set the target os (default %default)' ) parser . add_option ( '--cc' , default = 'gcc' , help = 'Set the target compiler type (default %default)' ) parser . add_option ( '--cc-bin' , default = None , help = 'Set path to compiler' ) parser . add_option ( '--root-dir' , metavar = 'D' , default = '.' , help = 'Set directory to execute from (default %default)' ) parser . add_option ( '--make-tool' , metavar = 'TOOL' , default = 'make' , help = 'Specify tool to run to build source (default %default)' ) parser . add_option ( '--extra-cxxflags' , metavar = 'FLAGS' , default = [ ] , action = 'append' , help = 'Specify extra build flags' ) parser . add_option ( '--cpu' , default = None , help = 'Specify a target CPU platform' ) parser . add_option ( '--with-debug' , action = 'store_true' , default = False , help = 'Include debug information' ) parser . add_option ( '--amalgamation' , action = 'store_true' , default = False , help = 'Build via amalgamation' ) parser . add_option ( '--disable-shared' , action = 'store_true' , default = False , help = 'Disable building shared libraries' ) parser . add_option ( '--branch' , metavar = 'B' , default = None , help = 'Specify branch being built' ) parser . add_option ( '--add-travis-folds' , action = 'store_true' , default = False , help = 'Add fold markers for Travis UI' ) parser . add_option ( '--dry-run' , action = 'store_true' , default = False , help = 'Just show commands to be executed' ) parser . add_option ( '--build-jobs' , metavar = 'J' , default = get_concurrency ( ) , help = 'Set number of jobs to run in parallel (default %default)' ) parser . add_option ( '--compiler-cache' , default = None , metavar = 'CC' , help = 'Set a compiler cache to use (ccache, sccache, clcache)' ) parser . add_option ( '--pkcs11-lib' , default = None , metavar = 'LIB' , help = 'Set PKCS11 lib to use for testing' ) parser . add_option ( '--with-python3' , dest = 'use_python3' , action = 'store_true' , default = None , help = 'Enable using python3' ) parser . add_option ( '--without-python3' , dest = 'use_python3' , action = 'store_false' , help = 'Disable using python3' ) parser . add_option ( '--with-pylint3' , dest = 'use_pylint3' , action = 'store_true' , default = True , help = 'Enable using python3 pylint' ) parser . add_option ( '--without-pylint3' , dest = 'use_pylint3' , action = 'store_false' , help = 'Disable using python3 pylint' ) parser . add_option ( '--disable-werror' , action = 'store_true' , default = False , help = 'Allow warnings to compile' ) parser . add_option ( '--run-under-gdb' , dest = 'use_gdb' , action = 'store_true' , default = False , help = 'Run test suite under gdb and capture backtrace' ) return parser . parse_args ( args )