Examples of ASTPair


Examples of antlr.ASTPair

  }
 
  public final void builtInType() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST builtInType_AST = null;
   
    switch ( LA(1)) {
    case LITERAL_void:
    {
View Full Code Here

Examples of antlr.ASTPair

  }
 
  public final void qualifiedTypeName() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST qualifiedTypeName_AST = null;
   
    AST tmp72_AST = null;
    tmp72_AST = astFactory.create(LT(1));
    match(IDENT);
View Full Code Here

Examples of antlr.ASTPair

  }
 
  public final void typeArguments() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST typeArguments_AST = null;
    Token first = LT(1);
    int currentLtLevel = 0;
   
    if ( inputState.guessing==0 ) {
      currentLtLevel = ltCounter;
    }
    match(LT);
    if ( inputState.guessing==0 ) {
      ltCounter++;
    }
    nls();
    typeArgument();
    astFactory.addASTChild(currentAST, returnAST);
    {
    _loop58:
    do {
      if (((LA(1)==COMMA) && (_tokenSet_38.member(LA(2))))&&(inputState.guessing !=0 || ltCounter == currentLtLevel + 1)) {
        match(COMMA);
        nls();
        typeArgument();
        astFactory.addASTChild(currentAST, returnAST);
      }
      else {
        break _loop58;
      }
     
    } while (true);
    }
    nls();
    {
    if ((_tokenSet_39.member(LA(1))) && (_tokenSet_40.member(LA(2)))) {
      typeArgumentsOrParametersEnd();
      astFactory.addASTChild(currentAST, returnAST);
    }
    else if ((_tokenSet_40.member(LA(1))) && (_tokenSet_3.member(LA(2)))) {
    }
    else {
      throw new NoViableAltException(LT(1), getFilename());
    }
   
    }
    if (!(matchGenericTypeBrackets(((currentLtLevel != 0) || ltCounter == currentLtLevel),
        "Missing closing bracket '>' for generics types", "Please specify the missing bracket!")))
      throw new SemanticException("matchGenericTypeBrackets(((currentLtLevel != 0) || ltCounter == currentLtLevel),\n        \"Missing closing bracket '>' for generics types\", \"Please specify the missing bracket!\")");
    if ( inputState.guessing==0 ) {
      typeArguments_AST = (AST)currentAST.root;
      typeArguments_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_ARGUMENTS,"TYPE_ARGUMENTS",first,LT(1))).add(typeArguments_AST));
      currentAST.root = typeArguments_AST;
      currentAST.child = typeArguments_AST!=null &&typeArguments_AST.getFirstChild()!=null ?
        typeArguments_AST.getFirstChild() : typeArguments_AST;
      currentAST.advanceChildToEnd();
    }
    typeArguments_AST = (AST)currentAST.root;
    returnAST = typeArguments_AST;
  }
View Full Code Here

Examples of antlr.ASTPair

  }
 
  public final void balancedTokens() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST balancedTokens_AST = null;
   
    {
    _loop563:
    do {
View Full Code Here

Examples of antlr.ASTPair

* is only a lookahead, not the real rule.
*/
  public final void genericMethodStart() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST genericMethodStart_AST = null;
   
    {
    int _cnt33=0;
    _loop33:
View Full Code Here

Examples of antlr.ASTPair

/** Used to look ahead for a constructor
*/
  public final void constructorStart() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST constructorStart_AST = null;
    Token  id = null;
    AST id_AST = null;
   
    modifiersOpt();
View Full Code Here

Examples of antlr.ASTPair

 
/** A list of zero or more modifiers, annotations, or "def". */
  public final void modifiersOpt() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST modifiersOpt_AST = null;
    Token first = LT(1);
   
    {
    if ((_tokenSet_12.member(LA(1))) && (_tokenSet_43.member(LA(2)))) {
      modifiersInternal();
      astFactory.addASTChild(currentAST, returnAST);
    }
    else if ((_tokenSet_44.member(LA(1))) && (_tokenSet_45.member(LA(2)))) {
    }
    else {
      throw new NoViableAltException(LT(1), getFilename());
    }
   
    }
    if ( inputState.guessing==0 ) {
      modifiersOpt_AST = (AST)currentAST.root;
      modifiersOpt_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))).add(modifiersOpt_AST));
      currentAST.root = modifiersOpt_AST;
      currentAST.child = modifiersOpt_AST!=null &&modifiersOpt_AST.getFirstChild()!=null ?
        modifiersOpt_AST.getFirstChild() : modifiersOpt_AST;
      currentAST.advanceChildToEnd();
    }
    modifiersOpt_AST = (AST)currentAST.root;
    returnAST = modifiersOpt_AST;
  }
View Full Code Here

Examples of antlr.ASTPair

 
/** Used only as a lookahead predicate for nested type declarations. */
  public final void typeDeclarationStart() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST typeDeclarationStart_AST = null;
   
    modifiersOpt();
    {
    switch ( LA(1)) {
View Full Code Here

Examples of antlr.ASTPair

  public final void classTypeSpec(
    boolean addImagNode
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST classTypeSpec_AST = null;
    AST ct_AST = null;
    Token first = LT(1);
   
    classOrInterfaceType(false);
    ct_AST = (AST)returnAST;
    declaratorBrackets(ct_AST);
    astFactory.addASTChild(currentAST, returnAST);
    if ( inputState.guessing==0 ) {
      classTypeSpec_AST = (AST)currentAST.root;
     
      if ( addImagNode ) {
      classTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(classTypeSpec_AST));
      }
     
      currentAST.root = classTypeSpec_AST;
      currentAST.child = classTypeSpec_AST!=null &&classTypeSpec_AST.getFirstChild()!=null ?
        classTypeSpec_AST.getFirstChild() : classTypeSpec_AST;
      currentAST.advanceChildToEnd();
    }
    classTypeSpec_AST = (AST)currentAST.root;
    returnAST = classTypeSpec_AST;
  }
View Full Code Here

Examples of antlr.ASTPair

  public final void builtInTypeSpec(
    boolean addImagNode
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST builtInTypeSpec_AST = null;
    AST bt_AST = null;
    Token first = LT(1);
   
    builtInType();
    bt_AST = (AST)returnAST;
    declaratorBrackets(bt_AST);
    astFactory.addASTChild(currentAST, returnAST);
    if ( inputState.guessing==0 ) {
      builtInTypeSpec_AST = (AST)currentAST.root;
     
      if ( addImagNode ) {
      builtInTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(builtInTypeSpec_AST));
      }
     
      currentAST.root = builtInTypeSpec_AST;
      currentAST.child = builtInTypeSpec_AST!=null &&builtInTypeSpec_AST.getFirstChild()!=null ?
        builtInTypeSpec_AST.getFirstChild() : builtInTypeSpec_AST;
      currentAST.advanceChildToEnd();
    }
    builtInTypeSpec_AST = (AST)currentAST.root;
    returnAST = builtInTypeSpec_AST;
  }
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.