Examples of Parser


Examples of org.jrdf.parser.Parser

        this.mapFactory = newMapFactory;
    }

    public void parse(Graph graph, GraphPerformance performance) throws GraphException {
        InputStream stream = getResource();
        Parser parser = new RdfXmlParser(graph.getElementFactory(), mapFactory);
        long startTime = System.currentTimeMillis();
        parse(stream, parser);
        performance.outputResult(graph, startTime, "Testing Parsing Performance (" + PATH + "): ");
    }
View Full Code Here

Examples of org.jrdf.sparql.parser.parser.Parser

     * @throws InvalidQuerySyntaxException If the syntax of the query is incorrect.
     */
    public Query parseQuery(Graph graph, String queryText) throws InvalidQuerySyntaxException {
        checkNotNull(graph);
        checkNotEmptyString("queryText", queryText);
        Parser parser = parserFactory.getParser(queryText);
        Start start = tryParse(parser);
        return analyseQuery(graph, start);
    }
View Full Code Here

Examples of org.jruby.parser.Parser

    if (original.equals("")) return original;
       
        StringWriter outputWriter = new StringWriter();
        ReWriteVisitor visitor = new ReWriteVisitor(outputWriter, original);
        ParserConfiguration configuration = new ParserConfiguration(0, true, false);
        new Parser(null).parseRewriter("", new ByteArrayInputStream(original.getBytes()), configuration).accept(visitor);
    visitor.flushStream();
    return outputWriter.getBuffer().toString();
  }
View Full Code Here

Examples of org.jrubyparser.Parser

    private Module loadFunctionsFromFile(File file, Module parent) {
        try {
            Properties docNodes = collectDocNodes(file);
            Module module = new Module(getModuleName(file), true, parent);
            Parser parser = new Parser();
            Node node = parser.parse(file.getName(), new FileReader(file), new ParserConfiguration());
            List<Node> defnNodes = findNodes(node, new INodeFilter() {

                public void visitStart(Node node) {
                }
View Full Code Here

Examples of org.jsoup.parser.Parser

     * @throws IOException
     */
    public Template(String path, InputStream input) throws TemplateException {
        try {
            this.path = path;
            this.doc = Jsoup.parse(input, "UTF-8", "", new Parser(new BlockTagSupportHtmlTreeBuilder()));
            // this.doc = Jsoup.parse(input, "UTF-8", "");
            initDocument();
        } catch (Exception e) {
            String msg = String.format("Template %s initialize failed.", path);
            throw new TemplateException(msg, e);
View Full Code Here

Examples of org.kabeja.parser.Parser

    protected Parser getParser(String extension) {
        Iterator<Parser> i = this.parsers.iterator();

        while (i.hasNext()) {
            Parser parser = i.next();

            if (parser.supportedExtension(extension)) {
                return parser;
            }
        }

        return null;
View Full Code Here

Examples of org.lealone.command.Parser

     * @param sql the SQL statement
     * @param rightsChecked true if the rights have already been checked
     * @return the prepared statement
     */
    public Prepared prepare(String sql, boolean rightsChecked) {
        Parser parser = createParser();
        parser.setRightsChecked(rightsChecked);
        return parser.prepare(sql);
    }
View Full Code Here

Examples of org.lilypondbeans.jccparser.Parser

            String text = "{" + doc.getText(pos, len).trim() + "}";//"a" is parsed as declaration
            ret.type = TYPE_NOTE;
            ret.node = pitch;
            ByteArrayInputStream in = new ByteArrayInputStream(text.getBytes());
            Parser p = new Parser(in);
            ASTDocument ll = p.Document();
            ret.pitch = (ASTPitch) ll.jjtGetChild(0).jjtGetChild(0);
            int x = text.length() - 1;
            ret.rest = "";

        } catch (Exception ex) {
View Full Code Here

Examples of org.livesub.input.parsers.Parser

        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(CaptionsParser.class.getName()).log(Level.SEVERE, null, ex);
        }
       
        DoubleLinkedList<Caption> subs = new DoubleLinkedList<Caption>();
        Parser parser = null;
       
        if(file.getName().toLowerCase().endsWith(".srt")) {
            parser = new SrtParser();
        } else if(file.getName().toLowerCase().endsWith(".sub")) {
            parser = new SubParser();
        }
       
        if(parser != null) {
            subs = parser.read(br);
        }
       
        return subs;
    }
View Full Code Here

Examples of org.mozilla.javascript.Parser

            }

            public void error(String message, String sourceName, int line, String lineSource, int lineOffset) {
            }
        });
        return new Parser(env);
    }
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.