Package org.asdt.core.internal.antlr

Examples of org.asdt.core.internal.antlr.AS3Parser.endOfFile()


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


   */
  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

  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

  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
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.