Package persistence.antlr

Examples of persistence.antlr.NoViableAltException


      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      match(COLON);
    }
    else if ((LA(1)==ACTION) && (LA(2)==COLON)) {
      ab = LT(1);
      match(ACTION);
      if ( inputState.guessing==0 ) {
        behavior.refInitAction(ab);
      }
      match(COLON);
    }
    else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) {
    }
    else {
      throw new NoViableAltException(LT(1), getFilename());
    }
   
    }
    block();
    match(RPAREN);
    {
    switch ( LA(1)) {
    case STRING_LITERAL:
    case ACTION:
    case SEMI:
    case CHAR_LITERAL:
    case OR:
    case TOKEN_REF:
    case OPEN_ELEMENT_OPTION:
    case LPAREN:
    case RPAREN:
    case BANG:
    case LITERAL_exception:
    case RULE_REF:
    case NOT_OP:
    case SEMPRED:
    case TREE_BEGIN:
    case QUESTION:
    case STAR:
    case PLUS:
    case WILDCARD:
    {
      {
      switch ( LA(1)) {
      case QUESTION:
      {
        match(QUESTION);
        if ( inputState.guessing==0 ) {
          behavior.optionalSubRule();
        }
        break;
      }
      case STAR:
      {
        match(STAR);
        if ( inputState.guessing==0 ) {
          behavior.zeroOrMoreSubRule();
        }
        break;
      }
      case PLUS:
      {
        match(PLUS);
        if ( inputState.guessing==0 ) {
          behavior.oneOrMoreSubRule();
        }
        break;
      }
      case STRING_LITERAL:
      case ACTION:
      case SEMI:
      case CHAR_LITERAL:
      case OR:
      case TOKEN_REF:
      case OPEN_ELEMENT_OPTION:
      case LPAREN:
      case RPAREN:
      case BANG:
      case LITERAL_exception:
      case RULE_REF:
      case NOT_OP:
      case SEMPRED:
      case TREE_BEGIN:
      case WILDCARD:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      switch ( LA(1)) {
      case BANG:
      {
        match(BANG);
        if ( inputState.guessing==0 ) {
          behavior.noASTSubRule();
        }
        break;
      }
      case STRING_LITERAL:
      case ACTION:
      case SEMI:
      case CHAR_LITERAL:
      case OR:
      case TOKEN_REF:
      case OPEN_ELEMENT_OPTION:
      case LPAREN:
      case RPAREN:
      case LITERAL_exception:
      case RULE_REF:
      case NOT_OP:
      case SEMPRED:
      case TREE_BEGIN:
      case WILDCARD:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      break;
    }
    case IMPLIES:
    {
      match(IMPLIES);
      if ( inputState.guessing==0 ) {
        behavior.synPred();
      }
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    if ( inputState.guessing==0 ) {
      behavior.endSubRule();
View Full Code Here


    do {
      if ((_tokenSet_2.member(LA(1)))) {
        element();
      }
      else {
        if ( _cnt122>=1 ) { break _loop122; } else {throw new NoViableAltException(LT(1), getFilename());}
      }
     
      _cnt122++;
    } while (true);
    }
View Full Code Here

      }
    }
    else if ((_tokenSet_7.member(LA(1))) && (_tokenSet_11.member(LA(2)))) {
    }
    else {
      throw new NoViableAltException(LT(1), getFilename());
    }
   
    }
    terminal(label);
  }
View Full Code Here

    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    return autoGen ;
  }
View Full Code Here

        id2 = LT(1);
        match(ID);
        t=id2;
      }
      else {
        throw new NoViableAltException(LT(1), getFilename());
      }
     
      }
      match(ASSIGN);
      i = LT(1);
View Full Code Here

      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      _loop268:
View Full Code Here

      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      match(LITERAL_class);
      sub = LT(1);
      match(ID);
      match(LITERAL_extends);
      sup = LT(1);
      match(ID);
      {
      switch ( LA(1)) {
      case SUBRULE_BLOCK:
      {
        sc=superClass();
        break;
      }
      case SEMI:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      match(SEMI);
     
            gr = (Grammar)hier.getGrammar(sub.getText());
            if ( gr!=null ) {
      //        antlr.Tool.toolError("redefinition of grammar "+gr.getName()+" ignored");
              gr=null;
              throw new SemanticException("redefinition of grammar "+sub.getText(), file, sub.getLine(), sub.getColumn());
            }
            else {
              gr = new Grammar(hier.getTool(), sub.getText(), sup.getText(), rules);
              gr.superClass=sc;
              if ( preamble!=null ) {
                gr.setPreambleAction(preamble.getText());
              }
            }
         
      {
      switch ( LA(1)) {
      case OPTIONS_START:
      {
        classOptions=optionSpec(gr);
        break;
      }
      case ACTION:
      case ID:
      case TOKENS_SPEC:
      case LITERAL_protected:
      case LITERAL_private:
      case LITERAL_public:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
     
          if ( gr!=null ) {
            gr.setOptions(classOptions);
          }
         
      {
      switch ( LA(1)) {
      case TOKENS_SPEC:
      {
        tk = LT(1);
        match(TOKENS_SPEC);
        gr.setTokenSection(tk.getText());
        break;
      }
      case ACTION:
      case ID:
      case LITERAL_protected:
      case LITERAL_private:
      case LITERAL_public:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      switch ( LA(1)) {
      case ACTION:
      {
        memberA = LT(1);
        match(ACTION);
        gr.setMemberAction(memberA.getText());
        break;
      }
      case ID:
      case LITERAL_protected:
      case LITERAL_private:
      case LITERAL_public:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      int _cnt277=0;
      _loop277:
      do {
        if ((_tokenSet_2.member(LA(1)))) {
          rule(gr);
        }
        else {
          if ( _cnt277>=1 ) { break _loop277; } else {throw new NoViableAltException(LT(1), getFilename());}
        }
       
        _cnt277++;
      } while (true);
      }
View Full Code Here

      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      r = LT(1);
      match(ID);
      {
      switch ( LA(1)) {
      case BANG:
      {
        match(BANG);
        bang=true;
        break;
      }
      case ACTION:
      case OPTIONS_START:
      case ARG_ACTION:
      case LITERAL_returns:
      case RULE_BLOCK:
      case LITERAL_throws:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      switch ( LA(1)) {
      case ARG_ACTION:
      {
        arg = LT(1);
        match(ARG_ACTION);
        break;
      }
      case ACTION:
      case OPTIONS_START:
      case LITERAL_returns:
      case RULE_BLOCK:
      case LITERAL_throws:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      switch ( LA(1)) {
      case LITERAL_returns:
      {
        match(LITERAL_returns);
        ret = LT(1);
        match(ARG_ACTION);
        break;
      }
      case ACTION:
      case OPTIONS_START:
      case RULE_BLOCK:
      case LITERAL_throws:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      switch ( LA(1)) {
      case LITERAL_throws:
      {
        thr=throwsSpec();
        break;
      }
      case ACTION:
      case OPTIONS_START:
      case RULE_BLOCK:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      switch ( LA(1)) {
      case OPTIONS_START:
      {
        o=optionSpec(null);
        break;
      }
      case ACTION:
      case RULE_BLOCK:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      switch ( LA(1)) {
      case ACTION:
      {
        init = LT(1);
        match(ACTION);
        break;
      }
      case RULE_BLOCK:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      blk = LT(1);
      match(RULE_BLOCK);
View Full Code Here

      {
        break;
      }
      default:
      {
        throw new NoViableAltException(LT(1), getFilename());
      }
      }
      }
      {
      _loop298:
View Full Code Here

TOP

Related Classes of persistence.antlr.NoViableAltException

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.