Does nothing but raising PythranSyntaxError if specs
    are incompatible with the actual code
167649
def check_specs(specs, renamings, types):
    '''
    
    '''
    from pythran.types.tog import unify, clone, tr
    from pythran.types.tog import Function, TypeVariable, InferenceError

    functions = {renamings.get(k, k): v for k, v in specs.functions.items()}
    for fname, signatures in functions.items():
        ftype = types[fname]
        for signature in signatures:
            sig_type = Function([tr(p) for p in signature], TypeVariable())
            try:
                unify(clone(sig_type), clone(ftype))
            except InferenceError:
                raise PythranSyntaxError(
                    "Specification for `{}` does not match inferred type:\n"
                    "expected `{}`\n"
                    "got `Callable[[{}], ...]`".format(
                        fname,
                        ftype,
                        ", ".join(map(str, sig_type.types[:-1])))
                )
421570
def run():
    '''
    
    '''
    import argparse
    import distutils.sysconfig
    import pythran
    import numpy

    parser = argparse.ArgumentParser(
        prog='pythran-config',
        description='output build options for pythran-generated code',
        epilog="It's a megablast!"
    )

    parser.add_argument('--compiler', action='store_true',
                        help='print default compiler')

    parser.add_argument('--cflags', action='store_true',
                        help='print compilation flags')

    parser.add_argument('--libs', action='store_true',
                        help='print linker flags')

    parser.add_argument('--no-python', action='store_true',
                        help='do not include Python-related flags')

    parser.add_argument('--verbose', '-v', action='count', default=0,
                        help=(
                            'verbose mode: [-v] prints warnings if pythranrc '
                            'has an invalid configuration; use '
                            '[-vv] for more information')
                        )

    args = parser.parse_args(sys.argv[1:])

    args.python = not args.no_python

    output = []

    extension = pythran.config.make_extension(python=args.python)

    if args.verbose >= 1:
        if args.verbose == 1:
            logger.setLevel(logging.WARNING)
        else:
            logger.setLevel(logging.INFO)

        lint_cfg(cfg)

    if args.compiler or args.verbose >= 2:
        cxx = compiler() or 'c++'
        logger.info('CXX = '.rjust(10) + cxx)
        if args.compiler:
            output.append(cxx)

    if args.cflags or args.verbose>=2:
        def fmt_define(define):
            name, value = define
            if value is None:
                return '-D' + name
            else:
                return '-D' + name + '=' + value

        cflags = []
        cflags.extend(fmt_define(define)
                      for define in extension['define_macros'])
        cflags.extend(('-I' + include)
                      for include in extension['include_dirs'])
        if args.python:
            cflags.append('-I' + numpy.get_include())
            cflags.append('-I' + distutils.sysconfig.get_python_inc())

        logger.info('CFLAGS = '.rjust(10) + ' '.join(cflags))
        if args.cflags:
            output.extend(cflags)

    if args.libs or args.verbose>=2:
        ldflags = []
        ldflags.extend(('-L' + include)
                       for include in extension['library_dirs'])
        ldflags.extend(('-l' + include)
                       for include in extension['libraries'])

        if args.python:
            ldflags.append('-L' + distutils.sysconfig.get_config_var('LIBPL'))
            ldflags.extend(distutils.sysconfig.get_config_var('LIBS').split())
            ldflags.append('-lpython'
                           + distutils.sysconfig.get_config_var('VERSION'))

        logger.info('LDFLAGS = '.rjust(10) + ' '.join(ldflags))
        if args.libs:
            output.extend(ldflags)

    if output:
        print(' '.join(output))
1250635
def _load(content_or_fp):
    
    try:
        data = yaml.load(content_or_fp, Loader=yaml.loader.BaseLoader)
    except Exception as e:
        raise type(e)('Malformed yaml file:\n%r' % format_exc())

    try:
        ver = data['spec']
    except:
        raise ValueError('The file does not specify a spec version')

    try:
        ver = tuple(map(int, (ver.split("."))))
    except:
        raise ValueError("Invalid spec version format. Expect 'X.Y'"
                         " (X and Y integers), found %s" % ver)

    if ver > SPEC_VERSION_TUPLE:
        raise ValueError('The spec version of the file is '
                         '%s but the parser is %s. '
                         'Please update pyvisa-sim.' % (ver, SPEC_VERSION))

    return data
293466
function compatibilityValuesRamp (datasource, column, args) {
  var values = args[0];
  var method = (args[1] || 'quantiles').toLowerCase();
  var numBuckets = values.getLength();
  return getRamp(datasource, column, numBuckets, method).then(compatibilityCreateRampFn(values));
}
1303062
static void cannotConvertYet(AbstractCompiler compiler, Node n, String feature) {
    compiler.report(JSError.make(n, CANNOT_CONVERT_YET, feature));
  }
335595
def check_prohibited_output(chars, bad_tables):
    
    violator = check_against_tables(chars, bad_tables)
    if violator is not None:
        raise ValueError("Input contains invalid unicode codepoint: "
                         "U+{:04x}".format(ord(violator)))
589560
def pattern_error(self, original, loc, value_var, check_var):
        """"""
        base_line = clean(self.reformat(getline(loc, original)))
        line_wrap = self.wrap_str_of(base_line)
        repr_wrap = self.wrap_str_of(ascii(base_line))
        return (
            "if not " + check_var + ":\n" + openindent
            + match_err_var + ' = _coconut_MatchError("pattern-matching failed for " '
            + repr_wrap + ' " in " + _coconut.repr(_coconut.repr(' + value_var + ")))\n"
            + match_err_var + ".pattern = " + line_wrap + "\n"
            + match_err_var + ".value = " + value_var
            + "\nraise " + match_err_var + "\n" + closeindent
        )
1114270
function createSyntaxError (message, c) {
  if (c === undefined) {
    c = index - token.length;
  }
  let error = new SyntaxError(message + ' (char ' + c + ')');
  error['char'] = c;

  return error;
}
745656
def is_np_compat():
    
    curr = ctypes.c_bool()
    check_call(_LIB.MXIsNumpyCompatible(ctypes.byref(curr)))
    return curr.value
198954
public void mTokens() throws RecognitionException {
        // com/dyuproject/protostuff/parser/ProtoLexer.g:1:8: ( ASSIGN | AT | LEFTCURLY | RIGHTCURLY | LEFTPAREN | RIGHTPAREN | LEFTSQUARE | RIGHTSQUARE | SEMICOLON | COMMA | PLUS | MINUS | TO | TRUE | FALSE | PKG | SYNTAX | IMPORT | OPTION | MESSAGE | SERVICE | ENUM | REQUIRED | OPTIONAL | REPEATED | EXTENSIONS | EXTEND | GROUP | RPC | RETURNS | INT32 | INT64 | UINT32 | UINT64 | SINT32 | SINT64 | FIXED32 | FIXED64 | SFIXED32 | SFIXED64 | FLOAT | DOUBLE | BOOL | STRING | BYTES | DEFAULT | MAX | VOID | FULL_ID | ID | EXP | NUMDOUBLE | NUMFLOAT | NUMINT | HEX | OCTAL | COMMENT | WS | STRING_LITERAL )
        int alt20=59;
        alt20 = dfa20.predict(input);
        switch (alt20) {
            case 1 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:10: ASSIGN
                {
                mASSIGN(); 

                }
                break;
            case 2 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:17: AT
                {
                mAT(); 

                }
                break;
            case 3 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:20: LEFTCURLY
                {
                mLEFTCURLY(); 

                }
                break;
            case 4 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:30: RIGHTCURLY
                {
                mRIGHTCURLY(); 

                }
                break;
            case 5 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:41: LEFTPAREN
                {
                mLEFTPAREN(); 

                }
                break;
            case 6 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:51: RIGHTPAREN
                {
                mRIGHTPAREN(); 

                }
                break;
            case 7 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:62: LEFTSQUARE
                {
                mLEFTSQUARE(); 

                }
                break;
            case 8 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:73: RIGHTSQUARE
                {
                mRIGHTSQUARE(); 

                }
                break;
            case 9 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:85: SEMICOLON
                {
                mSEMICOLON(); 

                }
                break;
            case 10 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:95: COMMA
                {
                mCOMMA(); 

                }
                break;
            case 11 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:101: PLUS
                {
                mPLUS(); 

                }
                break;
            case 12 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:106: MINUS
                {
                mMINUS(); 

                }
                break;
            case 13 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:112: TO
                {
                mTO(); 

                }
                break;
            case 14 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:115: TRUE
                {
                mTRUE(); 

                }
                break;
            case 15 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:120: FALSE
                {
                mFALSE(); 

                }
                break;
            case 16 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:126: PKG
                {
                mPKG(); 

                }
                break;
            case 17 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:130: SYNTAX
                {
                mSYNTAX(); 

                }
                break;
            case 18 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:137: IMPORT
                {
                mIMPORT(); 

                }
                break;
            case 19 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:144: OPTION
                {
                mOPTION(); 

                }
                break;
            case 20 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:151: MESSAGE
                {
                mMESSAGE(); 

                }
                break;
            case 21 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:159: SERVICE
                {
                mSERVICE(); 

                }
                break;
            case 22 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:167: ENUM
                {
                mENUM(); 

                }
                break;
            case 23 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:172: REQUIRED
                {
                mREQUIRED(); 

                }
                break;
            case 24 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:181: OPTIONAL
                {
                mOPTIONAL(); 

                }
                break;
            case 25 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:190: REPEATED
                {
                mREPEATED(); 

                }
                break;
            case 26 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:199: EXTENSIONS
                {
                mEXTENSIONS(); 

                }
                break;
            case 27 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:210: EXTEND
                {
                mEXTEND(); 

                }
                break;
            case 28 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:217: GROUP
                {
                mGROUP(); 

                }
                break;
            case 29 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:223: RPC
                {
                mRPC(); 

                }
                break;
            case 30 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:227: RETURNS
                {
                mRETURNS(); 

                }
                break;
            case 31 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:235: INT32
                {
                mINT32(); 

                }
                break;
            case 32 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:241: INT64
                {
                mINT64(); 

                }
                break;
            case 33 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:247: UINT32
                {
                mUINT32(); 

                }
                break;
            case 34 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:254: UINT64
                {
                mUINT64(); 

                }
                break;
            case 35 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:261: SINT32
                {
                mSINT32(); 

                }
                break;
            case 36 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:268: SINT64
                {
                mSINT64(); 

                }
                break;
            case 37 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:275: FIXED32
                {
                mFIXED32(); 

                }
                break;
            case 38 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:283: FIXED64
                {
                mFIXED64(); 

                }
                break;
            case 39 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:291: SFIXED32
                {
                mSFIXED32(); 

                }
                break;
            case 40 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:300: SFIXED64
                {
                mSFIXED64(); 

                }
                break;
            case 41 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:309: FLOAT
                {
                mFLOAT(); 

                }
                break;
            case 42 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:315: DOUBLE
                {
                mDOUBLE(); 

                }
                break;
            case 43 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:322: BOOL
                {
                mBOOL(); 

                }
                break;
            case 44 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:327: STRING
                {
                mSTRING(); 

                }
                break;
            case 45 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:334: BYTES
                {
                mBYTES(); 

                }
                break;
            case 46 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:340: DEFAULT
                {
                mDEFAULT(); 

                }
                break;
            case 47 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:348: MAX
                {
                mMAX(); 

                }
                break;
            case 48 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:352: VOID
                {
                mVOID(); 

                }
                break;
            case 49 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:357: FULL_ID
                {
                mFULL_ID(); 

                }
                break;
            case 50 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:365: ID
                {
                mID(); 

                }
                break;
            case 51 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:368: EXP
                {
                mEXP(); 

                }
                break;
            case 52 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:372: NUMDOUBLE
                {
                mNUMDOUBLE(); 

                }
                break;
            case 53 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:382: NUMFLOAT
                {
                mNUMFLOAT(); 

                }
                break;
            case 54 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:391: NUMINT
                {
                mNUMINT(); 

                }
                break;
            case 55 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:398: HEX
                {
                mHEX(); 

                }
                break;
            case 56 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:402: OCTAL
                {
                mOCTAL(); 

                }
                break;
            case 57 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:408: COMMENT
                {
                mCOMMENT(); 

                }
                break;
            case 58 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:416: WS
                {
                mWS(); 

                }
                break;
            case 59 :
                // com/dyuproject/protostuff/parser/ProtoLexer.g:1:419: STRING_LITERAL
                {
                mSTRING_LITERAL(); 

                }
                break;

        }

    }
1016509
def _compile(self, p):
        
        if self._is_value_filter(p) and p[0] == '=~':
            try:
                p[2] = re.compile(p[2])
            except:  # Python doesn't document exactly what exceptions re.compile throws
                raise ValueError('Bad regex - {0}'.format(p[2]))
        elif self._is_operator(p):
            for operator_or_filter in (p[1] if p[0] != '!' else [p[1]]):
                self._compile(operator_or_filter)
18525
private void generateSyntaxErrorMessage(SourceUnit sourceUnit, AnnotationNode node, String msg) {
        SyntaxException error = new SyntaxException(msg, node.getLineNumber(), node.getColumnNumber());
        sourceUnit.getErrorCollector().addErrorAndContinue(new SyntaxErrorMessage(error, sourceUnit));
    }
769038
def p_error(self, elem):
        ''''''
        self.errors.append("Syntax error on line " + str(self.lexer.lineno)
                           + ". Got unexpected token " + elem.type)
883336
def to_native_types(self, slicer=None, na_rep='', float_format=None,
                        decimal='.', quoting=None, **kwargs):
        

        values = self.values
        if slicer is not None:
            values = values[:, slicer]

        # see gh-13418: no special formatting is desired at the
        # output (important for appropriate 'quoting' behaviour),
        # so do not pass it through the FloatArrayFormatter
        if float_format is None and decimal == '.':
            mask = isna(values)

            if not quoting:
                values = values.astype(str)
            else:
                values = np.array(values, dtype='object')

            values[mask] = na_rep
            return values

        from pandas.io.formats.format import FloatArrayFormatter
        formatter = FloatArrayFormatter(values, na_rep=na_rep,
                                        float_format=float_format,
                                        decimal=decimal, quoting=quoting,
                                        fixed_width=False)
        return formatter.get_result_as_array()
1088920
def _float_check(self, attribute_array, value, irow, key):
        ''''''
        value = value.strip(' ')
        try:
            if value:
                attribute_array = np.hstack([attribute_array, float(value)])
            else:
                attribute_array = np.hstack([attribute_array, np.nan])
        except:
            print(irow, key)
            msg = 'Input file format error at line: %d' % (irow + 2)
            msg += ' key: %s' % (key)
            raise ValueError(msg)
        return attribute_array
1242966
def _errcheck(result, func, arguments):
    

    if result != 0:
        raise XdoException(
            'Function {0} returned error code {1}'
            .format(func.__name__, result))
    return None
155974
def _handleParListMismatch(self, probStr, extra=False):
        

        errmsg = 'ERROR: mismatch between default and current par lists ' + \
               'for task "'+self.taskName+'"'
        if probStr:
            errmsg += '\n\t'+probStr
        errmsg += '\n(try: "unlearn '+self.taskName+'")'
        print(errmsg)
        return False