Package org.asdt.core.internal.antlr

Examples of org.asdt.core.internal.antlr.AS3Parser$InOperator_scope


      throw new SyntaxException(e);
    }
  }

  public static LinkedListTree parseForIter(String expr) {
    AS3Parser parser = ASTUtils.parse(expr + ")");
    try {
      LinkedListTree result = tree(parser.forIter());
      ensureRemainingInputIs(parser.getTokenStream(), AS3Parser.RPAREN, expr);
      return result;
    } catch (RecognitionException e) {
      throw new SyntaxException(e);
    }
  }
View Full Code Here


  /**
   * Given the type name to import, creates an IMPORT AST node
   */
  public static LinkedListTree parseImport(String name) {
    AS3Parser parser = ASTUtils.parse("import "+name+";");
    try {
      LinkedListTree result = tree(parser.importDefinition());
      parser.endOfFile()// assert no trailing data
      return result;
    } catch (RecognitionException e) {
      throw new SyntaxException(e);
    }
  }
View Full Code Here

   *
   * @throws SyntaxException if the given text doesn't form a valid
   * identifier.
   */
  public static LinkedListTree parseTypeSpec(String value) {
    AS3Parser parser = ASTUtils.parse(":" + value);
    try {
      LinkedListTree result = tree(parser.typeExpression());
      ensureNoMoreInput(parser.getTokenStream(), value);
      return result;
    } catch (RecognitionException e) {
      throw new SyntaxException("invalid type-spec "+ActionScriptFactory.str(value), e);
    }
  }
View Full Code Here

      throw new SyntaxException("Unexpected tokens in input: "+value);
    }
  }

  public static LinkedListTree parseForInVar(String expr) {
    AS3Parser parser = ASTUtils.parse(expr + " in");
    try {
      return tree(parser.forInClauseDecl());
    } catch (RecognitionException e) {
      throw new SyntaxException(e);
    }
  }
View Full Code Here

      throw new SyntaxException(e);
    }
  }

  public static LinkedListTree parseForInIterated(String expr) {
    AS3Parser parser = ASTUtils.parse(expr + ")");
    try {
      return tree(parser.forInClauseTail());
    } catch (RecognitionException e) {
      throw new SyntaxException(e);
    }
  }
View Full Code Here

      throw new SyntaxException(e);
    }
  }

  public static LinkedListTree parseVariableDeclarator(String assignment) {
    AS3Parser parser = ASTUtils.parse(assignment + ";");
    try {
      return tree(parser.variableDeclarator());
    } catch (RecognitionException e) {
      throw new SyntaxException(e);
    }
  }
View Full Code Here

    }
  }


  public static LinkedListTree parseSimpleIdent(String value) {
    AS3Parser parser = ASTUtils.parse(value);
    try {
      LinkedListTree result = tree(parser.ident());
      parser.endOfFile();
      return result;
    } catch (RecognitionException e) {
      throw new SyntaxException("invalid identifier "+ActionScriptFactory.str(value), e);
    }
  }
View Full Code Here

      throw new SyntaxException("invalid identifier "+ActionScriptFactory.str(value), e);
    }
  }

  public static LinkedListTree parseXMLLiteral(String value) {
    AS3Parser parser = ASTUtils.parse(value+" ");
    try {
      LinkedListTree result = tree(parser.xmlLiteral());
      parser.endOfFile();
      return result;
    } catch (RecognitionException e) {
      throw ASTUtils.buildSyntaxException(value, parser, e);
    }
  }
View Full Code Here

    }
  }


  public static LinkedListTree parseRegexpLiteral(String value) {
    AS3Parser parser = ASTUtils.parse(value + " ");
    try {
      LinkedListTree result = tree(parser.regexpLiteral());
      parser.endOfFile();
      return result;
    } catch (RecognitionException e) {
      throw ASTUtils.buildSyntaxException(value, parser, e);
    }
  }
View Full Code Here

    }
  }


  public static LinkedListTree parseQualifiedIdent(String value) {
    AS3Parser parser = ASTUtils.parse(value);
    try {
      LinkedListTree result = tree(parser.qualifiedIdent());
      parser.endOfFile();
      return result;
    } catch (RecognitionException e) {
      throw new SyntaxException("invalid identifier "+ActionScriptFactory.str(value), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.asdt.core.internal.antlr.AS3Parser$InOperator_scope

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.