Examples of parseModule()


Examples of com.stuffwithstuff.magpie.parser.MagpieParser.parseModule()

        }
      }
     
      // Evaluate the module.
      try {
        List<Expr> exprs = parser.parseModule();
        for (Expr expr : exprs) {
          evaluate(expr, module, module.getScope());
        }
      } catch (ParseException e) {
        String message = String.format("Syntax error at %s: %s",
View Full Code Here

Examples of dtool.parser.DeeParsingChecks.DeeTestsChecksParser.parseModule()

 
  public static final String DEFAULT_MODULE = "_tests";
 
  protected static Module parseSource(String source) {
    DeeTestsChecksParser parser = new DeeTestsChecksParser(source);
    return parser.parseModule(DEFAULT_MODULE, null).getNode();
  }
 
  protected static ASTNode parseSourceAndPickNode(String source, int offset) {
    Module module = parseSource(source);
    return ASTNodeFinder.findElement(module, offset);
View Full Code Here

Examples of org.python.antlr.AnalyzingParser.parseModule()

    private mod invokeANTLR(CharStream text, String filename) {
        AnalyzingParser p = new AnalyzingParser(text, filename, null);
        mod ast = null;
        try {
            ast = p.parseModule();
        } catch (Exception x) {
            fine("parse for " + filename + " failed: " + x);
        }
        recordParseErrors(filename, p.getRecognitionErrors());
        return ast;
View Full Code Here

Examples of org.rascalmpl.interpreter.Evaluator.parseModule()

  }
 
  public IValue parseModule(ISourceLocation loc, IEvaluatorContext ctx) {
    try {
      Evaluator ownEvaluator = getPrivateEvaluator(ctx);
      return ownEvaluator.parseModule(ownEvaluator.getMonitor(), loc.getURI());
    }
    catch (IOException e) {
      throw RuntimeExceptionFactory.io(values.string(e.getMessage()), null, null);
    }
    catch (Throwable e) {
View Full Code Here

Examples of org.rascalmpl.interpreter.Evaluator.parseModule()

    return cachedEvaluator;
  }
 
  public IValue parseModule(IString str, ISourceLocation loc, IEvaluatorContext ctx) {
    Evaluator ownEvaluator = getPrivateEvaluator(ctx);
    return ownEvaluator.parseModule(ownEvaluator.getMonitor(), str.getValue().toCharArray(), loc.getURI());
  }
 
  public IValue parseModule(ISourceLocation loc, final IList searchPath, IEvaluatorContext ctx) {
    final Evaluator ownEvaluator = getPrivateEvaluator(ctx);
    final URIResolverRegistry otherReg = ctx.getResolverRegistry();
View Full Code Here

Examples of org.rascalmpl.interpreter.Evaluator.parseModule()

    // add the given locations to the search path
    SourceLocationListContributor contrib = new SourceLocationListContributor("reflective", searchPath);
    ownEvaluator.addRascalSearchPathContributor(contrib);
   
    try {
      return ownEvaluator.parseModule(ownEvaluator.getMonitor(), loc.getURI());
    } catch (IOException e) {
      throw RuntimeExceptionFactory.io(values.string(e.getMessage()), null, null);
    }
    catch (Throwable e) {
      throw RuntimeExceptionFactory.javaException(e, null, null);
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.