Compatible to Parser.create()
961107
def create(self, data, inlineparent = None):
        '''
        
        '''
        if self.cstr:
            return _copy(data).rstrip(b'\x00')
        else:
            return _copy(data)
482029
def add_parser_from_field(self, name, field_cls):
        """"""
        self.__parser_map__[name] = _field2method(field_cls, method_name=name)
1113282
def create_parser():
    
    select = create_select()
    scan = create_scan()
    delete = create_delete()
    update = create_update()
    insert = create_insert()
    create = create_create()
    drop = create_drop()
    alter = create_alter()
    dump = create_dump()
    load = create_load()
    base = (
        select | scan | delete | update | insert | create | drop | alter | dump | load
    )
    explain = upkey("explain").setResultsName("action") + Group(
        select | scan | delete | update | insert | create | drop | alter
    )
    analyze = upkey("analyze").setResultsName("action") + Group(
        select | scan | delete | update | insert
    )
    dql = explain | analyze | base
    dql.ignore("--" + restOfLine)
    return dql
715795
private static CSSParser createParser(Object source, NetworkProcessor network, String encoding, SourceType type,
                                          URL base) throws IOException, CSSException {

        CSSInputStream input = getInput(source, network, encoding, type);
        input.setBase(base);
        return createParserForInput(input);
    }
673973
function Parser(str, opts) {
  this._oneWayVoid = !!(opts && opts.oneWayVoid);
  this._reassignJavadoc = !!(opts && opts.reassignJavadoc);
  this._imports = [];
  this._tk = new Tokenizer(str);
  this._tk.next(); // Prime tokenizer.
}
809503
function create(context) {
    return {
        CallExpression(node) {
            if (isObjectDefine(node)) {
                context.report(node, message);
            }
        }
    };
}
1108399
def create(parser_func: Union[ParsingMethodForStream, ParsingMethodForFile], caught: Exception):
        
        msg = 'Caught TypeError while calling parsing function \'' + str(parser_func.__name__) + '\'. ' \
              'Note that the parsing function signature should be ' + parsing_method_stream_example_signature_str \
              + ' (streaming=True) or ' + parsing_method_file_example_signature_str + ' (streaming=False).' \
              'Caught error message is : ' + caught.__class__.__name__ + ' : ' + str(caught)
        return CaughtTypeError(msg).with_traceback(caught.__traceback__)
775644
def new_parser(self):
        

        parser = argparse.ArgumentParser(description=self.description)
        parser.add_argument(
            '--version', help='show version and exit',
            default=False, action='store_true')
        parser.add_argument(
            '--debug', help='enable debugging',
            default=False, action='store_true')
        return parser
619748
def create(cls, type):
        
        if type == 0: return TagEnd()
        elif type == 1: return TagShowFrame()
        elif type == 2: return TagDefineShape()
        elif type == 4: return TagPlaceObject()
        elif type == 5: return TagRemoveObject()
        elif type == 6: return TagDefineBits()
        elif type == 7: return TagDefineButton()
        elif type == 8: return TagJPEGTables()
        elif type == 9: return TagSetBackgroundColor()
        elif type == 10: return TagDefineFont()
        elif type == 11: return TagDefineText()
        elif type == 12: return TagDoAction()
        elif type == 13: return TagDefineFontInfo()
        elif type == 14: return TagDefineSound()
        elif type == 15: return TagStartSound()
        elif type == 17: return TagDefineButtonSound()
        elif type == 18: return TagSoundStreamHead()
        elif type == 19: return TagSoundStreamBlock()
        elif type == 20: return TagDefineBitsLossless()
        elif type == 21: return TagDefineBitsJPEG2()
        elif type == 22: return TagDefineShape2()
        elif type == 24: return TagProtect()
        elif type == 26: return TagPlaceObject2()
        elif type == 28: return TagRemoveObject2()
        elif type == 32: return TagDefineShape3()
        elif type == 33: return TagDefineText2()
        elif type == 34: return TagDefineButton2()
        elif type == 35: return TagDefineBitsJPEG3()
        elif type == 36: return TagDefineBitsLossless2()
        elif type == 37: return TagDefineEditText()
        elif type == 39: return TagDefineSprite()
        elif type == 41: return TagProductInfo()
        elif type == 43: return TagFrameLabel()
        elif type == 45: return TagSoundStreamHead2()
        elif type == 46: return TagDefineMorphShape()
        elif type == 48: return TagDefineFont2()
        elif type == 56: return TagExportAssets()
        elif type == 58: return TagEnableDebugger()
        elif type == 59: return TagDoInitAction()
        elif type == 60: return TagDefineVideoStream()
        elif type == 61: return TagVideoFrame()
        elif type == 63: return TagDebugID()
        elif type == 64: return TagEnableDebugger2()
        elif type == 65: return TagScriptLimits()
        elif type == 69: return TagFileAttributes()
        elif type == 70: return TagPlaceObject3()
        elif type == 73: return TagDefineFontAlignZones()
        elif type == 74: return TagCSMTextSettings()
        elif type == 75: return TagDefineFont3()
        elif type == 76: return TagSymbolClass()
        elif type == 77: return TagMetadata()
        elif type == 78: return TagDefineScalingGrid()
        elif type == 82: return TagDoABC()
        elif type == 83: return TagDefineShape4()
        elif type == 84: return TagDefineMorphShape2()
        elif type == 86: return TagDefineSceneAndFrameLabelData()
        elif type == 87: return TagDefineBinaryData()
        elif type == 88: return TagDefineFontName()
        elif type == 89: return TagStartSound2()
        else: return None
238447
def createURLParserCtxt(filename, options):
    
    ret = libxml2mod.xmlCreateURLParserCtxt(filename, options)
    if ret is None:raise parserError('xmlCreateURLParserCtxt() failed')
    return parserCtxt(_obj=ret)
1308280
def create(self, data, inlineparent = None):
        '''
        
        '''
        try:
            return self.struct.unpack(data)[0]
        except struct.error as exc:
            raise BadFormatError(exc)
1373582
def createEntityParserCtxt(URL, ID, base):
    
    ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base)
    if ret is None:raise parserError('xmlCreateEntityParserCtxt() failed')
    return parserCtxt(_obj=ret)
291936
def create_parser():
    """"""
    from argparse import ArgumentParser, FileType

    description = ("PEP8 clean only the parts of the files which you have "
                   "touched since the last commit, a previous commit or "
                   "(the merge-base of) a branch.")
    epilog = ("Run before you commit, against a previous commit or "
              "branch before merging.")
    parser = ArgumentParser(description=description,
                            epilog=epilog,
                            prog='pep8radius')

    parser.add_argument('rev',
                        help='commit or name of branch to compare against',
                        nargs='?')

    parser.add_argument('--version',
                        help='print version number and exit',
                        action='store_true')

    parser.add_argument('-d', '--diff', action='store_true', dest='diff',
                        help='print the diff of fixed source vs original')
    parser.add_argument('--error-status', action='store_true',
                        dest='error_status',
                        help="return a shell status code of 1 if there are"
                             " any fixes")
    parser.add_argument('-i', '--in-place', action='store_true',
                        help="make the fixes in place; modify the files")
    parser.add_argument('--no-color', action='store_true',
                        help='do not print diffs in color '
                             '(default is to use color)')
    parser.add_argument('-v', '--verbose', action='count', dest='verbose',
                        default=0,
                        help='print verbose messages; '
                        'multiple -v result in more verbose messages '
                        '(one less -v is passed to autopep8)')
    parser.add_argument('--from-diff', type=FileType('r'), metavar='DIFF',
                        help="Experimental: rather than calling out to version"
                             " control, just pass in a diff; "
                             "the modified lines will be fixed")

    ap = parser.add_argument_group('pep8', 'Pep8 options to pass to autopep8.')
    ap.add_argument('-p', '--pep8-passes', metavar='n',
                    default=-1, type=int,
                    help='maximum number of additional pep8 passes '
                    '(default: infinite)')
    ap.add_argument('-a', '--aggressive', action='count', default=0,
                    help='enable non-whitespace changes; '
                    'multiple -a result in more aggressive changes')
    ap.add_argument('--experimental', action='store_true',
                    help='enable experimental fixes')
    ap.add_argument('--exclude', metavar='globs',
                    help='exclude file/directory names that match these '
                    'comma-separated globs')
    ap.add_argument('--list-fixes', action='store_true',
                    help='list codes for fixes and exit; '
                    'used by --ignore and --select')
    ap.add_argument('--ignore', metavar='errors', default='',
                    help='do not fix these errors/warnings '
                    '(default: {0})'.format(DEFAULT_IGNORE))
    ap.add_argument('--select', metavar='errors', default='',
                    help='fix only these errors/warnings (e.g. E4,W)')
    ap.add_argument('--max-line-length', metavar='n', default=79, type=int,
                    help='set maximum allowed line length '
                    '(default: %(default)s)')
    ap.add_argument('--indent-size', default=DEFAULT_INDENT_SIZE,
                    type=int, metavar='n',
                    help='number of spaces per indent level '
                    '(default %(default)s)')

    df = parser.add_argument_group('docformatter',
                                   'Fix docstrings for PEP257.')
    df.add_argument('-f', '--docformatter', action='store_true',
                    help='Use docformatter')
    df.add_argument('--no-blank', dest='post_description_blank',
                    action='store_false',
                    help='Do not add blank line after description')
    df.add_argument('--pre-summary-newline',
                    action='store_true',
                    help='add a newline before the summary of a '
                    'multi-line docstring')
    df.add_argument('--force-wrap', action='store_true',
                    help='force descriptions to be wrapped even if it may '
                    'result in a mess')

    cg = parser.add_argument_group('config',
                                   'Change default options based on global '
                                   'or local (project) config files.')
    cg.add_argument('--global-config',
                    default=DEFAULT_CONFIG,
                    metavar='filename',
                    help='path to global pep8 config file; ' +
                    " if this file does not exist then this is ignored" +
                    '(default: %s)' % DEFAULT_CONFIG)
    cg.add_argument('--ignore-local-config', action='store_true',
                    help="don't look for and apply local config files; "
                    'if not passed, defaults are updated with any '
                    "config files in the project's root directory")

    yp = parser.add_argument_group('yapf',
                                   'Options for yapf, alternative to autopep8. '
                                   'Currently any other options are ignored.')
    yp.add_argument('-y', '--yapf', action='store_true',
                    help='Use yapf rather than autopep8. '
                    'This ignores other arguments outside of this group.')
    yp.add_argument('--style', metavar='', default='pep8',
                    help='style either pep8, google, name of file with style'
                    'settings, or a dict')

    return parser
1254809
def create_arguments(self, subparsers=False):
        """"""
        ret = []
        if not self._finalized:
            for arg, d in self.unfinished_arguments.items():
                try:
                    not_positional = int(not d.pop('positional', False))
                    short = d.pop('short', None)
                    long_name = d.pop('long', None)
                    if short is None and long_name is None:
                        raise ValueError(
                            "Either a short (-) or a long (--) argument must "
                            "be provided!")
                    if not not_positional:
                        short = arg
                        long_name = None
                        d.pop('dest', None)
                    if short == long_name:
                        long_name = None
                    args = []
                    if short:
                        args.append('-' * not_positional + short)
                    if long_name:
                        args.append('--' * not_positional + long_name)
                    group = d.pop('group', self)
                    if d.get('action') in ['store_true', 'store_false']:
                        d.pop('metavar', None)
                    ret.append(group.add_argument(*args, **d))
                except Exception:
                    print('Error while creating argument %s' % arg)
                    raise
        else:
            raise ValueError('Parser has already been finalized!')
        self._finalized = True
        if subparsers and self._subparsers_action is not None:
            for parser in self._subparsers_action.choices.values():
                parser.create_arguments(True)
        return ret
617356
private Pair<ParserRuleContext, CommonTokenStream> prepareUri(final String input) {
		UriLexer lexer = new UriLexer(CharStreams.fromString(input));
		CommonTokenStream tokens = new CommonTokenStream(lexer);
		UriParser parser = new UriParser(tokens);

		parser.removeErrorListeners();
		parser.addErrorListener(new ContentUriBaseErrorListener() {
			@Override
			public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
				AssertKripton.assertTrue(false, "unespected char at pos %s of URI '%s'", charPositionInLine, input);
			}

			@Override
			public void reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) {
				AssertKripton.assertTrue(false, "ambiguity syntax at pos %s of URI '%s'", startIndex, input);
			}

			@Override
			public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) {
				AssertKripton.assertTrue(false, "error at pos %s of URI '%s'", startIndex, input);
			}

			@Override
			public void reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) {
				AssertKripton.assertTrue(false, "context eror at pos %s of URI '%s'", startIndex, input);
			}

		});

		ParserRuleContext context = parser.uri();
		return new Pair<>(context, tokens);
	}
657131
function parser(opt) {

  var options = opt || Object.create(null);
  var my = {
    filename: resolve(String(options.filename)),
    ip: Boolean(options.ip),
    url: Boolean(options.url),
    response: Boolean(options.response),
    pid: Boolean(options.pid),
    bytesReq: Boolean(options.bytesReq),
    bytesRes: Boolean(options.bytesRes),
    referrer: Boolean(options.referrer),
    auth: Boolean(options.auth),
    agent: Boolean(options.agent),
    version: Boolean(options.version),
    level: Boolean(options.level),
    message: Boolean(options.message),
    timestamp: Boolean(options.timestamp),
    report: options.report === false ? false : true,
    csv: options.csv,
    search: options.search
  };
  if (!fs.existsSync(my.filename)) {
    var e = my.filename + ' not exists';
    throw new Error(e);
  }
  if (my.csv) {
    my.csv = resolve(String(my.csv));
  }
  if (my.search) {
    my.search = new RegExp(my.search, 'g');
  }

  return wrapper(my);
}
1210955
Node createAwait(JSType jsType, Node value) {
    Node result = IR.await(value);
    if (isAddingTypes()) {
      result.setJSType(checkNotNull(jsType));
    }
    return result;
  }