Examples of compile()


Examples of mondrian.calc.ExpCompiler.compile()

            createCompiler(
                evaluator, validator, resultStyleList);
        if (scalar) {
            return compiler.compileScalar(exp, false);
        } else {
            return compiler.compile(exp);
        }
    }

    public ExpCompiler createCompiler() {
        Evaluator evaluator = RolapEvaluator.create(this);
View Full Code Here

Examples of net.domesdaybook.expression.compiler.sequence.SequenceMatcherCompiler.compile()

     */
    public final void setSequence(final String seq) {
        try {
            final String transformedSequence = FragmentRewriter.rewriteFragment(seq);
            SequenceMatcherCompiler compiler = new SequenceMatcherCompiler();
            matcher = compiler.compile(transformedSequence);
            searcher = new BoyerMooreHorspoolSearcher(matcher);
        } catch (ParseException ex) {
            final String warning = String.format(SEQUENCE_PARSE_ERROR, seq, ex.getMessage());
            getLog().warn(warning);
            //throw new IllegalArgumentException(seq, ex);
View Full Code Here

Examples of net.janino.Java.CompilationUnit.compile()

    public byte[] compile( String name, String source) throws Exception {
      // using janino embeddable compiller
      Parser p = new Parser( new Scanner( name, new StringReader( source)));
      CompilationUnit cu = p.parseCompilationUnit();
      IClassLoader cl = new ClassLoaderIClassLoader( new URLClassLoader( new URL[] {}));
      return cu.compile( cl, 0)[0].toByteArray();
    }
 
  }
 
}
View Full Code Here

Examples of net.sf.antcontrib.cpptasks.compiler.CompilerConfiguration.compile()

                            .nextElement());
                    sourceFiles[index++] = targetInfo.getSources()[0]
                            .toString();
                }
                try {
                    config.compile(this, _objDir, sourceFiles, relentless,
                            monitor);
                } catch (BuildException ex) {
                    if (compileException == null) {
                        compileException = ex;
                    }
View Full Code Here

Examples of net.sf.jsptest.compiler.api.JspCompiler.compile()

        JspCompiler compiler = JspCompilerFactory.newInstance();
        log.debug("Using compiler " + compiler.getClass().getName() + " and webroot "
                + new File(getWebRoot()).getAbsolutePath());
        compiler.setWebRoot(getWebRoot());
        compiler.setOutputDirectory(getOutputDirectory());
        Jsp jsp = compiler.compile(path, substituteTaglibs);
        log.debug("Simulating a request to " + path);
        execution = jsp.request(httpMethod, requestAttributes, sessionAttributes, requestParameters);
    }

    private void validatePath(String path) {
View Full Code Here

Examples of net.sf.lapg.lex.RegexpParser.compile()

      rp.compile(1, "keyw", "do");
      rp.buildSets();
      Assert.assertEquals("[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1]", Arrays.toString(rp.getCharacterMap()));

      rp = new RegexpParser();
      rp.compile(0, "string", "[a-w][p-z]");
      rp.compile(1, "string2", "[b-c][y-z]");
      rp.buildSets();
      Assert.assertEquals("[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 3, 6, 6, 1, 1, 1, 1, 1]", Arrays.toString(rp.getCharacterMap()));
      int[][] p = rp.getSetToSymbolsMap();
      Assert.assertEquals("[2, 4, 5]", Arrays.toString(p[0]));
View Full Code Here

Examples of net.sf.saxon.s9api.XPathCompiler.compile()

        XPathCompiler xcomp = runtime.getProcessor().newXPathCompiler();
        xcomp.declareVariable(doca);
        xcomp.declareVariable(docb);

        XPathExecutable xexec = xcomp.compile("deep-equal($doca,$docb)");
        XPathSelector selector = xexec.load();

        selector.setVariable(doca,sdoc);
        selector.setVariable(docb,adoc);
View Full Code Here

Examples of net.sf.saxon.s9api.XQueryCompiler.compile()

        try {
            Processor qtproc = runtime.getProcessor();
            DocumentBuilder builder = qtproc.newDocumentBuilder();
            builder.setBaseURI(new URI("http://example.com/"));
            XQueryCompiler xqcomp = qtproc.newXQueryCompiler();
            XQueryExecutable xqexec = xqcomp.compile(".");
            XQueryEvaluator xqeval = xqexec.load();
            xqeval.setContextItem(doc);

            serializer = new Serializer();
View Full Code Here

Examples of net.sf.saxon.s9api.XsltCompiler.compile()

    this.builder = proc.newDocumentBuilder();
    XsltCompiler comp = proc.newXsltCompiler();
    XsltExecutable exp = null;
    try {
      //xslStylesheet = getServeletContext().getResourceAsStream("/WEB-INF/proc.xsl");
      exp = comp.compile(new StreamSource(xslSheet));
      //exp = comp.compile(new StreamSource(new File("proc.xsl")));
    } catch (SaxonApiException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

Examples of net.sf.saxon.xpath.XPathEvaluator.compile()

            xpf.setXPathFunctionResolver(new JaxpFunctionResolver(ctx, oxpath20));
            xpf.setXPathVariableResolver(new JaxpVariableResolver(ctx, oxpath20));
            XPathEvaluator xpe = (XPathEvaluator) xpf.newXPath();
            xpe.setNamespaceContext(oxpath20.namespaceCtx);
            // Just checking that the expression is valid
            XPathExpression expr = xpe.compile(((OXPath10Expression)cexp).xpath);

            Object evalResult = expr.evaluate(ctx.getRootNode() == null ? DOMUtils.newDocument() : ctx.getRootNode(), type);
            if (evalResult != null && __log.isDebugEnabled()) {
                __log.debug("Expression " + cexp.toString() + " generated result " + evalResult
                        + " - type=" + evalResult.getClass().getName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.