Examples of Parser


Examples of com.google.javascript.jscomp.mozilla.rhino.Parser

    if (config.isIdeMode) {
      compilerEnv.setAllowMemberExprAsFunctionName(true);
    }
    compilerEnv.setIdeMode(config.isIdeMode);

    Parser p = new Parser(compilerEnv, errorReporter);
    AstRoot astRoot = null;
    try {
      astRoot = p.parse(sourceString, sourceFile.getName(), 1);
    } catch (EvaluatorException e) {
      logger.info(
          "Error parsing " + sourceFile.getName() + ": " + e.getMessage());
    } finally {
      Context.exit();
View Full Code Here

Examples of com.google.javascript.jscomp.parsing.parser.Parser

    Es6ErrorReporter es6ErrorReporter =
        new Es6ErrorReporter(errorReporter, file, config);
    com.google.javascript.jscomp.parsing.parser.Parser.Config es6config =
        new com.google.javascript.jscomp.parsing.parser.Parser.Config(mode(
            config.languageMode));
    Parser p = new Parser(es6config, es6ErrorReporter, file);
    ProgramTree tree = p.parseProgram();
    Node root = null;
    List<Comment> comments = ImmutableList.of();
    if (tree != null && (!es6ErrorReporter.hadError() || config.isIdeMode)) {
      root = NewIRFactory.transformTree(
          tree, sourceFile, sourceString, config, errorReporter);
      root.setIsSyntheticBlock(true);

      if (config.isIdeMode) {
        comments = p.getComments();
      }
    }
    return new ParseResult(root, comments);
  }
View Full Code Here

Examples of com.google.refine.grel.Parser

            return parseGREL(s);
        }
    }
   
    static protected Evaluable parseGREL(String s) throws ParsingException {
        Parser parser = new Parser(s);
       
        return parser.getExpression();
    }
View Full Code Here

Examples of com.google.test.metric.cpp.Parser

import junit.framework.TestCase;

public class VariableTest extends TestCase {

  private TranslationUnit parse(String source) throws Exception {
    return new Parser().parse(source);
  }
View Full Code Here

Examples of com.googlecode.flaxcrawler.parse.Parser

            if (page != null) {
                crawlerTask.setTimeDownloaded(new Date());

                if (page.getResponseCode() == HttpURLConnection.HTTP_OK) {
                    log.debug(url + " was downloaded successfully. Download time " + page.getResponseTime());
                    Parser parser = parserController.getParser(page);
                    log.debug("Parsing " + url);
                    parser.parse(page);
                    crawlerTask.setTimeParsed(new Date());
                    log.debug(url + " has been parsed. " + page.getLinks().size() + " links were found");
                }
            }
        } finally {
View Full Code Here

Examples of com.granule.json.internal.Parser

     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
     */
    public JSONObject(String str) throws JSONException {
        super();
        StringReader reader = new StringReader(str);
        (new Parser(reader)).parse(this);
    }
View Full Code Here

Examples of com.hp.hpl.jena.extras.tools.notations.likeN3.Parser

    private static Model empty = ModelFactory.createDefaultModel();
   
    @Test public void testEmptyBlankNode()
        {
        Model m = ModelFactory.createDefaultModel();
        Resource r = new Parser( "[]" ).resourceIn( m );
        assertIsoModels( empty, m );
        assertTrue( r.isAnon() );
        }
View Full Code Here

Examples of com.hp.hpl.jena.reasoner.rulesys.Rule.Parser

      rules = VINE_PREFIX_FOR_RULES
          + "\n" + VINE_UNREIFICATION_RULE
          + "\n" + SYM_RULE
      ;
     
      Parser parser = Rule.rulesParserFromReader(new BufferedReader(new StringReader(rules)));
      ruleReasoner = new GenericRuleReasoner(Rule.parseRules(parser));
    }
    else {
      rules = RDF_UNREIFICATION_RULE
          + "\n" + SYM_RULE
View Full Code Here

Examples of com.hp.hpl.jena.sparql.lang.Parser

        if ( syntaxURI == null )
            syntaxURI = query.getSyntax() ;
        else
            query.setSyntax(syntaxURI) ;

        Parser parser = Parser.createParser(syntaxURI) ;
       
        if ( parser == null )
            throw new UnsupportedOperationException("Unrecognized syntax for parsing: "+syntaxURI) ;
       
        if ( query.getResolver() == null )
        {
           
            // Sort out the baseURI - if that fails, dump in a dummy one and continue.
            try { baseURI = IRIResolver.chooseBaseURI(baseURI) ; }
            catch (Exception ex)
            { baseURI = "http://localhost/defaultBase#" ; }
   
            query.setResolver(new IRIResolver(baseURI)) ;
        }
        return parser.parse(query, queryString) ;
    }
View Full Code Here

Examples of com.jclark.xml.parse.io.Parser

    System.out.println((System.currentTimeMillis() - startTime)/1000.0);
    System.exit(hadErr ? 1 : 0);
  }

  static boolean parseEntity(OpenEntity entity) throws IOException {
    Parser parser = new ParserImpl();
    try {
      parser.parseDocument(entity);
      return true;
    }
    catch (NotWellFormedException e) {
      System.err.println(e.getMessage());
      return false;
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.