Package org.rascalmpl.parser.uptr

Examples of org.rascalmpl.parser.uptr.UPTRNodeFactory


    try {
      eval.startJob("Parsing " + location, 10);
      eval.event("initial parse");

      IConstructor tree = new RascalParser().parse(Parser.START_MODULE, location, data, actions, new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory());

      if (TreeAdapter.isAmb(tree)) {
        // Ambiguity is dealt with elsewhere
        return tree;
      }
View Full Code Here


    IGTD<IConstructor, IConstructor, ISourceLocation> parser = env.getBootstrap() ? new RascalParser() : getParser(eval, env, TreeAdapter.getLocation(tree).getURI(), false);
   
    try {
      String parserMethodName = eval.getParserGenerator().getParserMethodName(symTree);
      DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation> converter = new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>();
      UPTRNodeFactory nodeFactory = new UPTRNodeFactory();
   
      char[] input = replaceAntiQuotesByHoles(eval, lit, antiquotes);
     
      IConstructor fragment = (IConstructor) parser.parse(parserMethodName, uri, input, converter, nodeFactory);
      fragment = replaceHolesByAntiQuotes(eval, fragment, antiquotes);
View Full Code Here

  public AbstractStackNode<IConstructor>[] S(){
    return (AbstractStackNode<IConstructor>[]) new AbstractStackNode[]{S_EXPECT_1[0]};
  }
 
  public IConstructor executeParser(){
    return parse(NONTERMINAL_START_S, null, "a".toCharArray(), new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory());
  }
View Full Code Here

  public AbstractStackNode<IConstructor>[] B(){
    return (AbstractStackNode<IConstructor>[]) new AbstractStackNode[]{B_EXPECT_1[0], B_EXPECT_2[0]};
  }
 
  public IConstructor executeParser(){
    return parse(NONTERMINAL_START_S, null, "a".toCharArray(), new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory());
  }
View Full Code Here

    initializeRecovery(robust, lookaheads, robustProds);
   
    __setInterrupt(false);
    IActionExecutor<IConstructor> exec = new RascalFunctionActionExecutor(this);
   
    return (IConstructor) parser.parse(name, location, input, exec, new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory(), robustProds.length == 0 ? null : new Recoverer(robustProds, lookaheads));
  }
View Full Code Here

  private Result<IValue> eval(String command, URI location)
      throws ImplementationError {
    __setInterrupt(false);
    IActionExecutor<IConstructor> actionExecutor =  new NoActionExecutor();
    IConstructor tree = new RascalParser().parse(Parser.START_COMMAND, location, command.toCharArray(), actionExecutor, new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory());
   
    if (!noBacktickOutsideStringConstant(command)) {
      tree = org.rascalmpl.semantics.dynamic.Import.parseFragments(this, tree, location, getCurrentModuleEnvironment());
    }
   
View Full Code Here

      throws ImplementationError {
    __setInterrupt(false);
    IConstructor tree;
   
    IActionExecutor<IConstructor> actionExecutor = new NoActionExecutor();
    tree = new RascalParser().parse(Parser.START_COMMANDS, location, command.toCharArray(), actionExecutor, new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory());
 
    if (!noBacktickOutsideStringConstant(command)) {
      tree = org.rascalmpl.semantics.dynamic.Import.parseFragments(this, tree, location, getCurrentModuleEnvironment());
    }
View Full Code Here

 
 
  private IConstructor parseCommand(String command, URI location) {
    __setInterrupt(false);
    IActionExecutor<IConstructor> actionExecutor =  new NoActionExecutor();
    IConstructor tree =  new RascalParser().parse(Parser.START_COMMAND, location, command.toCharArray(), actionExecutor, new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory());

    if (!noBacktickOutsideStringConstant(command)) {
      tree = org.rascalmpl.semantics.dynamic.Import.parseFragments(this, tree, location, getCurrentModuleEnvironment());
    }
   
View Full Code Here

  public IConstructor parseCommands(IRascalMonitor monitor, String commands, URI location) {
    IRascalMonitor old = setMonitor(monitor);
    try {
      __setInterrupt(false);
      IActionExecutor<IConstructor> actionExecutor =  new NoActionExecutor();
      IConstructor tree = new RascalParser().parse(Parser.START_COMMANDS, location, commands.toCharArray(), actionExecutor, new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory());
 
      if (!noBacktickOutsideStringConstant(commands)) {
        tree = parseFragments(this, tree, location, getCurrentModuleEnvironment());
      }
     
View Full Code Here

  public AbstractStackNode<IConstructor>[] S(){
    return (AbstractStackNode<IConstructor>[]) new AbstractStackNode[]{S_EXPECT_1[0]};
  }
 
  public IConstructor executeParser(){
    return parse(NONTERMINAL_START_S, null, "Bla".toCharArray(), new DefaultNodeFlattener<IConstructor, IConstructor, ISourceLocation>(), new UPTRNodeFactory());
  }
View Full Code Here

TOP

Related Classes of org.rascalmpl.parser.uptr.UPTRNodeFactory

Copyright © 2018 www.massapicom. 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.