C++ specification, provided for example, and java compatible.
342179
def cpp_spec():
    """"""
    return {
        INDENTATION    : '\t',
        BEG_BLOCK      : '{',
        END_BLOCK      : '}',
        BEG_LINE       : '',
        END_LINE       : '\n',
        BEG_ACTION     : '',
        END_ACTION     : ';',
        BEG_CONDITION  : 'if(',
        END_CONDITION  : ')',
        LOGICAL_AND    : ' && ',
        LOGICAL_OR     : ' || '
    }
1142509
function makeMutable(v, opts) {
    if (TypeUtils.isNullOrUndefined(v)) {
        return v;
    }
    if (!opts) {
        opts = {};
    }
    return BitmapFactory.makeBitmapMutable(v, opts);
}
1225294
function bundleCompilers(compilers, opts) {
    if (!opts) { opts = {}; }

    var transforms = [].concat(opts.pipeTo || []);
    var s = stream.PassThrough({ objectMode: !!opts.objectMode });

    Rx.Node.writeToStream(
        compilers.flatMap(function (res) {
            var bundle = res.compiler.bundle(R.omit(["objectMode", "pipeTo"], opts));

            return Rx.Node.fromStream(
                R.reduce(function (b, t) {
                    return b.pipe(t(res.name, res.compiler));
                }, bundle, transforms)
            );
        }),
        s
    );

    return s;
}
832759
public static boolean isCompatible(Class<?>[] cs, Object[] os) {
		int len = cs.length;
		if (len != os.length)
			return false;
		if (len == 0)
			return true;
		for (int i = 0; i < len; i++)
			if (!isCompatible(cs[i], os[i]))
				return false;
		return true;
	}
1337120
function compile(parsed) {
    var a = parsed[0],
        b = parsed[1] - 1;

    //when b <= 0, a*n won't be possible for any matches when a < 0
    //besides, the specification says that no element is matched when a and b are 0
    if (b < 0 && a <= 0) return falseFunc;

    //when a is in the range -1..1, it matches any element (so only b is checked)
    if (a === -1)
        return function(pos) {
            return pos <= b;
        };
    if (a === 0)
        return function(pos) {
            return pos === b;
        };
    //when b <= 0 and a === 1, they match any element
    if (a === 1)
        return b < 0
            ? trueFunc
            : function(pos) {
                  return pos >= b;
              };

    //when a > 0, modulo can be used to check if there is a match
    var bMod = b % a;
    if (bMod < 0) bMod += a;

    if (a > 1) {
        return function(pos) {
            return pos >= b && pos % a === bMod;
        };
    }

    a *= -1; //make `a` positive

    return function(pos) {
        return pos <= b && pos % a === bMod;
    };
}
888159
function Compiler(node, options) {
  this.options = options = options || {};
  this.node = node;
  this.hasCompiledDoctype = false;
  this.hasCompiledTag = false;
  this.pp = options.pretty || false;
  if (this.pp && typeof this.pp !== 'string') {
    this.pp = '  ';
  }
  this.debug = false !== options.compileDebug;
  this.indents = 0;
  this.parentIndents = 0;
  this.terse = false;
  this.mixins = {};
  this.dynamicMixins = false;
  this.eachCount = 0;
  if (options.doctype) this.setDoctype(options.doctype);
  this.runtimeFunctionsUsed = [];
  this.inlineRuntimeFunctions = options.inlineRuntimeFunctions || false;
  if (this.debug && this.inlineRuntimeFunctions) {
    this.runtimeFunctionsUsed.push('rethrow');
  }
  this.codeBuffer = '_=function*(){';
  this.codeMarker = {};
  this.codeIndex = -1;

  this.useGenerators = false;
  this.templateVars = ['locals']

}
681397
function (out) {
            out.newBlock("main", 0);
            out.newBlock("classDefinition", 0);
            out.newBlock("prototype", 2);
            out.newBlock("globalVars", 5);
            out.newBlock("initTemplate", 3);
            out.newBlock("classInit", 3);
        }
66916
def compile(patterns, flags):  # noqa A001
    """"""

    positive = []
    negative = []
    if isinstance(patterns, (str, bytes)):
        patterns = [patterns]

    for pattern in patterns:
        for expanded in expand_braces(pattern, flags):
            (negative if is_negative(expanded, flags) else positive).append(_compile(expanded, flags))

    if patterns and flags & REALPATH and negative and not positive:
        positive.append(_compile(b'**' if isinstance(patterns[0], bytes) else '**', flags))

    return WcRegexp(tuple(positive), tuple(negative), flags & REALPATH, flags & PATHNAME, flags & FOLLOW)
576990
def cpp_flag(compiler):
    
    standards = ['-std=c++14', '-std=c++11', '-std=c++0x']
    for standard in standards:
        if has_flag(compiler, [standard]):
            return standard
    raise RuntimeError(
        'Unsupported compiler -- at least C++0x support '
        'is needed!'
    )
696199
private ImmutableList<ParseTree> parseExportSpecifierSet() {
    ImmutableList.Builder<ParseTree> elements;
    elements = ImmutableList.builder();
    eat(TokenType.OPEN_CURLY);
    while (peekIdOrKeyword()) {
      elements.add(parseExportSpecifier());
      if (!peek(TokenType.CLOSE_CURLY)) {
        eat(TokenType.COMMA);
      }
    }
    eat(TokenType.CLOSE_CURLY);
    return elements.build();
  }
149951
function compile(inFile, outFile, sourceMap, cb) {
    console.log('Compiling ' + inFile + ' to ' + outFile);
    var outStream = fs.createWriteStream(outFile, 'utf8');
    outStream.on('close', cb);
    browserify({debug: true})
      .require(inFile, { entry: true })
      .bundle()
      .pipe(exorcist(sourceMap))
      .pipe(outStream);
}
1184988
def generate(env):
    """"""
    cplusplus.generate(env)

    if acc:
        env['CXX']        = acc or 'aCC'
        env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS +Z')
        # determine version of aCC
        line = os.popen(acc + ' -V 2>&1').readline().rstrip()
        if line.find('aCC: HP ANSI C++') == 0:
            env['CXXVERSION'] = line.split()[-1]

        if env['PLATFORM'] == 'cygwin':
            env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
        else:
            env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS +Z')
365778
public Class<?> compile(String className, String code, ClassLoader classLoader, OutputStream os, long lastModify) {
        code = code.trim();
        try {
            return Class.forName(className, true, classLoader);
        } catch (ClassNotFoundException e) {
            if (!code.endsWith("}")) {
                throw new IllegalStateException("The java code not endsWith \"}\", code: \n" + code + "\n");
            }
            try {
                return doCompile(className, code, os);
            } catch (RuntimeException t) {
                throw t;
            } catch (Throwable t) {
                throw new IllegalStateException("Failed to compile class, cause: " + t.getMessage() + ", class: "
                        + className + ", code: \n" + code + "\n, stack: " + ClassUtils.toString(t));
            }
        }
    }
1355008
function (value, node) {
        return (
               this.exec_spec(value, node.op1)  /*  RECURSION  */
            || this.exec_spec(value, node.op2)  /*  RECURSION  */
        );
    }
1244461
def cpp_lib_builder(build_context, target):
    """"""
    yprint(build_context.conf, 'Build CppLib', target)
    workspace_dir = build_context.get_workspace('CppLib', target.name)
    workspace_src_dir = join(workspace_dir, 'src')
    rmtree(workspace_src_dir)
    link_cpp_artifacts(build_context, target, workspace_src_dir, False)
    buildenv_workspace = build_context.conf.host_to_buildenv_path(
        workspace_src_dir)
    objects = compile_cc(
        build_context, target.compiler_config, target.props.in_buildenv,
        get_source_files(target, build_context), workspace_src_dir,
        buildenv_workspace, target.props.cmd_env)
    for obj_file in objects:
        target.artifacts.add(AT.object, obj_file)
803237
function output (consumer, template, params, getDefault) {
	return new Output (consumer, template, params, getDefault);
}
517720
void writeSimple(Class<?> declaredType, Object value) throws IOException {
        // simple types have no need to write a type object
        Class<?> realType = value.getClass();
        if (realType == Integer.class) {
            output.writeInt(((Integer) value).intValue());
            return;
        } else if (realType == Double.class) {
            output.writeDouble(((Double) value).doubleValue());
            return;
        } else if (realType == Float.class) {
            output.writeFloat(((Float) value).floatValue());
            return;
        } else if (realType == Boolean.class) {
            output.writeBoolean(((Boolean) value).booleanValue());
            return;
        }

        // handle no declared type and subclasses
        Class<?> effectiveType = getAndSerializeEffectiveTypeIfRequired(value, declaredType);

        // long/short/byte only processed now to ensure that a distinction can be made between Integer and Long
        if (realType == Long.class) {
            output.writeLong(((Long) value).longValue());
            return;
        } else if (realType == Short.class) {
            output.writeInt(((Short) value).shortValue());
            return;
        } else if (realType == Byte.class) {
            output.writeInt(((Byte) value).byteValue());
            return;
        } else if (realType == byte[].class) {
            output.writeBytes((byte[]) value);
            return;
        }

        // write as a string
        try {
            writeObjectAsString(value, effectiveType);
        } catch (RuntimeException ex) {
            throw new IllegalArgumentException("Unable to convert type " + effectiveType.getName() + " declared as " + declaredType.getName(), ex);
        }
    }