Package org.jostraca.comp.antlr

Examples of org.jostraca.comp.antlr.NoViableAltException


    do {
      if ((_tokenSet_0.member(LA(1))) && (_tokenSet_1.member(LA(2)))) {
        rule();
      }
      else {
        if ( _cnt68>=1 ) { break _loop68; } else {throw new NoViableAltException(LT(1), getFilename());}
      }
     
      _cnt68++;
    } while (true);
    }
View Full Code Here


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

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

          {
            break;
          }
          default:
          {
            throw new NoViableAltException(LT(1), getFilename());
          }
          }
          }
          if ( inputState.guessing==0 ) {
            behavior.defineToken(t1, s1);
          }
          {
          switch ( LA(1)) {
          case OPEN_ELEMENT_OPTION:
          {
            tokensSpecOptions(t1);
            break;
          }
          case SEMI:
          {
            break;
          }
          default:
          {
            throw new NoViableAltException(LT(1), getFilename());
          }
          }
          }
          break;
        }
        case STRING_LITERAL:
        {
          s3 = LT(1);
          match(STRING_LITERAL);
          if ( inputState.guessing==0 ) {
            behavior.defineToken(null, s3);
          }
          {
          switch ( LA(1)) {
          case OPEN_ELEMENT_OPTION:
          {
            tokensSpecOptions(s3);
            break;
          }
          case SEMI:
          {
            break;
          }
          default:
          {
            throw new NoViableAltException(LT(1), getFilename());
          }
          }
          }
          break;
        }
        default:
        {
          throw new NoViableAltException(LT(1), getFilename());
        }
        }
        }
        match(SEMI);
      }
      else {
        if ( _cnt43>=1 ) { break _loop43; } else {throw new NoViableAltException(LT(1), getFilename());}
      }
     
      _cnt43++;
    } while (true);
    }
View Full Code Here

    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    {
    switch ( LA(1)) {
    case LITERAL_protected:
    {
      p1 = LT(1);
      match(LITERAL_protected);
      if ( inputState.guessing==0 ) {
        access=p1.getText();
      }
      break;
    }
    case LITERAL_public:
    {
      p2 = LT(1);
      match(LITERAL_public);
      if ( inputState.guessing==0 ) {
        access=p2.getText();
      }
      break;
    }
    case LITERAL_private:
    {
      p3 = LT(1);
      match(LITERAL_private);
      if ( inputState.guessing==0 ) {
        access=p3.getText();
      }
      break;
    }
    case TOKEN_REF:
    case RULE_REF:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    idTok=id();
    {
    switch ( LA(1)) {
    case BANG:
    {
      match(BANG);
      if ( inputState.guessing==0 ) {
        ruleAutoGen = false;
      }
      break;
    }
    case ACTION:
    case OPTIONS:
    case ARG_ACTION:
    case LITERAL_returns:
    case COLON:
    case LITERAL_throws:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    if ( inputState.guessing==0 ) {
     
          behavior.defineRuleName(idTok, access, ruleAutoGen, doc);
       
    }
    {
    switch ( LA(1)) {
    case ARG_ACTION:
    {
      aa = LT(1);
      match(ARG_ACTION);
      if ( inputState.guessing==0 ) {
        behavior.refArgAction(aa);
      }
      break;
    }
    case ACTION:
    case OPTIONS:
    case LITERAL_returns:
    case COLON:
    case LITERAL_throws:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    {
    switch ( LA(1)) {
    case LITERAL_returns:
    {
      match(LITERAL_returns);
      rt = LT(1);
      match(ARG_ACTION);
      if ( inputState.guessing==0 ) {
        behavior.refReturnAction(rt);
      }
      break;
    }
    case ACTION:
    case OPTIONS:
    case COLON:
    case LITERAL_throws:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    {
    switch ( LA(1)) {
    case LITERAL_throws:
    {
      throwsSpec();
      break;
    }
    case ACTION:
    case OPTIONS:
    case COLON:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    {
    switch ( LA(1)) {
    case OPTIONS:
    {
      ruleOptionsSpec();
      break;
    }
    case ACTION:
    case COLON:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    {
    switch ( LA(1)) {
    case ACTION:
    {
      a = LT(1);
      match(ACTION);
      if ( inputState.guessing==0 ) {
        behavior.refInitAction(a);
      }
      break;
    }
    case COLON:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    match(COLON);
    block();
    match(SEMI);
    {
    switch ( LA(1)) {
    case LITERAL_exception:
    {
      exceptionGroup();
      break;
    }
    case EOF:
    case ACTION:
    case DOC_COMMENT:
    case LITERAL_lexclass:
    case LITERAL_class:
    case TOKEN_REF:
    case LITERAL_protected:
    case LITERAL_public:
    case LITERAL_private:
    case RULE_REF:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    if ( inputState.guessing==0 ) {
      behavior.endRule(idTok.getText());
View Full Code Here

    do {
      if ((LA(1)==LITERAL_exception)) {
        exceptionSpec();
      }
      else {
        if ( _cnt95>=1 ) { break _loop95; } else {throw new NoViableAltException(LT(1), getFilename());}
      }
     
      _cnt95++;
    } while (true);
    }
View Full Code Here

    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    if ( inputState.guessing==0 ) {
      behavior.beginAlt(altAutoGen);
    }
    {
    _loop91:
    do {
      if ((_tokenSet_2.member(LA(1)))) {
        element();
      }
      else {
        break _loop91;
      }
     
    } while (true);
    }
    {
    switch ( LA(1)) {
    case LITERAL_exception:
    {
      exceptionSpecNoLabel();
      break;
    }
    case SEMI:
    case OR:
    case RPAREN:
    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    if ( inputState.guessing==0 ) {
      behavior.endAlt();
View Full Code Here

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

    {
      break;
    }
    default:
    {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
    }
    if ( inputState.guessing==0 ) {
      behavior.beginExceptionSpec(labelAction);
View Full Code Here

          }
        }
        else if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF) && (_tokenSet_3.member(LA(2)))) {
        }
        else {
          throw new NoViableAltException(LT(1), getFilename());
        }
       
        }
        {
        switch ( LA(1)) {
        case RULE_REF:
        {
          rr = LT(1);
          match(RULE_REF);
          {
          switch ( LA(1)) {
          case ARG_ACTION:
          {
            aa = LT(1);
            match(ARG_ACTION);
            if ( inputState.guessing==0 ) {
              args=aa;
            }
            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 ) {
              autoGen = GrammarElement.AUTO_GEN_BANG;
            }
            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());
          }
          }
          }
          if ( inputState.guessing==0 ) {
            behavior.refRule(assignId, rr, label, args, autoGen);
          }
          break;
        }
        case TOKEN_REF:
        {
          tr = LT(1);
          match(TOKEN_REF);
          {
          switch ( LA(1)) {
          case ARG_ACTION:
          {
            aa2 = LT(1);
            match(ARG_ACTION);
            if ( inputState.guessing==0 ) {
              args=aa2;
            }
            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());
          }
          }
          }
          if ( inputState.guessing==0 ) {
            behavior.refToken(assignId, tr, label, args, false, autoGen, lastInRule());
          }
          break;
        }
        default:
        {
          throw new NoViableAltException(LT(1), getFilename());
        }
        }
        }
      }
      else if ((_tokenSet_4.member(LA(1))) && (_tokenSet_5.member(LA(2)))) {
        {
        if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF) && (LA(2)==COLON)) {
          label=id();
          match(COLON);
          if ( inputState.guessing==0 ) {
            checkForMissingEndRule(label);
          }
        }
        else if ((_tokenSet_4.member(LA(1))) && (_tokenSet_6.member(LA(2)))) {
        }
        else {
          throw new NoViableAltException(LT(1), getFilename());
        }
       
        }
        {
        switch ( LA(1)) {
        case RULE_REF:
        {
          r2 = LT(1);
          match(RULE_REF);
          {
          switch ( LA(1)) {
          case ARG_ACTION:
          {
            aa3 = LT(1);
            match(ARG_ACTION);
            if ( inputState.guessing==0 ) {
              args=aa3;
            }
            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 ) {
              autoGen = GrammarElement.AUTO_GEN_BANG;
            }
            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());
          }
          }
          }
          if ( inputState.guessing==0 ) {
            behavior.refRule(assignId, r2, label, args, autoGen);
          }
          break;
        }
        case NOT_OP:
        {
          match(NOT_OP);
          {
          switch ( LA(1)) {
          case CHAR_LITERAL:
          case TOKEN_REF:
          {
            notTerminal(label);
            break;
          }
          case LPAREN:
          {
            ebnf(label,true);
            break;
          }
          default:
          {
            throw new NoViableAltException(LT(1), getFilename());
          }
          }
          }
          break;
        }
        case LPAREN:
        {
          ebnf(label,false);
          break;
        }
        default:
          if ((LA(1)==STRING_LITERAL||LA(1)==CHAR_LITERAL||LA(1)==TOKEN_REF) && (LA(2)==RANGE)) {
            range(label);
          }
          else if ((_tokenSet_7.member(LA(1))) && (_tokenSet_8.member(LA(2)))) {
            terminal(label);
          }
        else {
          throw new NoViableAltException(LT(1), getFilename());
        }
        }
        }
      }
    else {
      throw new NoViableAltException(LT(1), getFilename());
    }
    }
  }
View Full Code Here

TOP

Related Classes of org.jostraca.comp.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.