Package persistence.antlr

Examples of persistence.antlr.NoViableAltForCharException


                        token.getText(), ex);
                }
            }
        }
        else if (ex instanceof NoViableAltForCharException) {
            NoViableAltForCharException noViableAlt = (NoViableAltForCharException)ex;
            result = EJBQLException.unexpectedChar(getQueryInfo(),
                noViableAlt.getLine(), noViableAlt.getColumn(),
                String.valueOf((char)noViableAlt.foundChar), ex);
        }
        else if (ex instanceof TokenStreamRecognitionException) {
            result = handleANTLRException(((TokenStreamRecognitionException)ex).recog);
        }
View Full Code Here


          mACTION(true);
          theRetToken=_returnToken;
        }
        else {
          if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
        else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
        }
       
        if ( _returnToken==null ) continue tryAgain; // found SKIP token
        _ttype = _returnToken.getType();
        _returnToken.setType(_ttype);
View Full Code Here

      default:
        if ((_tokenSet_0.member(LA(1)))) {
          mSTUFF(false);
        }
      else {
        if ( _cnt382>=1 ) { break _loop382; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
      }
      _cnt382++;
    } while (true);
    }
View Full Code Here

        {
        match(_tokenSet_2);
        }
      }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
View Full Code Here

      }
     
      }
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
View Full Code Here

        {
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        match('(');
        mTEXT_ARG(true);
        a5=_returnToken;
        match(')');
      }
      else {
      }
     
      }
     
            String rule = currentRule.getRuleName();
            if ( a5!=null ) {
              rule = a5.getText();
            }
            String setName = generator.getFOLLOWBitSet(rule, 1);
            // System.out.println("FOLLOW("+rule+")="+setName);
            if ( setName==null ) {
              reportError("$FOLLOW("+rule+")"+
                    ": unknown rule or bad lookahead computation");
            }
            else {
              text.setLength(_begin); text.append(setName);
            }
         
    }
    else if ((LA(1)=='$') && (LA(2)=='F') && (LA(3)=='I')) {
      match("$FIRST");
      {
      if ((_tokenSet_5.member(LA(1))) && (_tokenSet_6.member(LA(2))) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
        {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
        {
          mWS(false);
          break;
        }
        case '(':
        {
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        match('(');
        mTEXT_ARG(true);
        a6=_returnToken;
        match(')');
      }
      else {
      }
     
      }
     
            String rule = currentRule.getRuleName();
            if ( a6!=null ) {
              rule = a6.getText();
            }
            String setName = generator.getFIRSTBitSet(rule, 1);
            // System.out.println("FIRST("+rule+")="+setName);
            if ( setName==null ) {
              reportError("$FIRST("+rule+")"+
                    ": unknown rule or bad lookahead computation");
            }
            else {
              text.setLength(_begin); text.append(setName);
            }
         
    }
    else if ((LA(1)=='$') && (LA(2)=='a')) {
      match("$append");
      {
      switch ( LA(1)) {
      case '\t'case '\n'case '\r'case ' ':
      {
        mWS(false);
        break;
      }
      case '(':
      {
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
      match('(');
      mTEXT_ARG(true);
      a1=_returnToken;
      match(')');
     
            String t = "text.append("+a1.getText()+")";
            text.setLength(_begin); text.append(t);
         
    }
    else if ((LA(1)=='$') && (LA(2)=='s')) {
      match("$set");
      {
      if ((LA(1)=='T') && (LA(2)=='e')) {
        match("Text");
        {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
        {
          mWS(false);
          break;
        }
        case '(':
        {
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        match('(');
        mTEXT_ARG(true);
        a2=_returnToken;
        match(')');
       
              String t;
              t = "text.setLength(_begin); text.append("+a2.getText()+")";
              text.setLength(_begin); text.append(t);
             
      }
      else if ((LA(1)=='T') && (LA(2)=='o')) {
        match("Token");
        {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
        {
          mWS(false);
          break;
        }
        case '(':
        {
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        match('(');
        mTEXT_ARG(true);
        a3=_returnToken;
        match(')');
       
              String t="_token = "+a3.getText();
              text.setLength(_begin); text.append(t);
             
      }
      else if ((LA(1)=='T') && (LA(2)=='y')) {
        match("Type");
        {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
        {
          mWS(false);
          break;
        }
        case '(':
        {
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        match('(');
        mTEXT_ARG(true);
        a4=_returnToken;
        match(')');
       
              String t="_ttype = "+a4.getText();
              text.setLength(_begin); text.append(t);
             
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
    }
    else if ((LA(1)=='$') && (LA(2)=='g')) {
      match("$getText");
     
            text.setLength(_begin); text.append("new String(text.getBuffer(),_begin,text.length()-_begin)");
         
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
View Full Code Here

    }
    else if ((LA(1)=='/') && (LA(2)=='*')) {
      mML_COMMENT(false);
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
View Full Code Here

    }
    else if ((_tokenSet_8.member(LA(1)))) {
      matchNot('\'');
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    match('\'');
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
View Full Code Here

    {
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    _saveIndex=text.length();
    mTREE_ELEMENT(true);
    text.setLength(_saveIndex);
    t=_returnToken;
    terms.appendElement(t.getText());
    {
    switch ( LA(1)) {
    case '\t'case '\n'case '\r'case ' ':
    {
      _saveIndex=text.length();
      mWS(false);
      text.setLength(_saveIndex);
      break;
    }
    case ')'case ',':
    {
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    {
    _loop407:
    do {
      if ((LA(1)==',')) {
        _saveIndex=text.length();
        match(',');
        text.setLength(_saveIndex);
        {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
        {
          _saveIndex=text.length();
          mWS(false);
          text.setLength(_saveIndex);
          break;
        }
        case '"'case '#'case '('case 'A':
        case 'B'case 'C'case 'D'case 'E':
        case 'F'case 'G'case 'H'case 'I':
        case 'J'case 'K'case 'L'case 'M':
        case 'N'case 'O'case 'P'case 'Q':
        case 'R'case 'S'case 'T'case 'U':
        case 'V'case 'W'case 'X'case 'Y':
        case 'Z'case '['case '_'case 'a':
        case 'b'case 'c'case 'd'case 'e':
        case 'f'case 'g'case 'h'case 'i':
        case 'j'case 'k'case 'l'case 'm':
        case 'n'case 'o'case 'p'case 'q':
        case 'r'case 's'case 't'case 'u':
        case 'v'case 'w'case 'x'case 'y':
        case 'z':
        {
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        _saveIndex=text.length();
        mTREE_ELEMENT(true);
        text.setLength(_saveIndex);
        t2=_returnToken;
        terms.appendElement(t2.getText());
        {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
        {
          _saveIndex=text.length();
          mWS(false);
          text.setLength(_saveIndex);
          break;
        }
        case ')'case ',':
        {
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
      }
      else {
View Full Code Here

      match('_');
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    {
    _loop464:
    do {
      if ((_tokenSet_9.member(LA(1))) && (true) && (true)) {
        {
        switch ( LA(1)) {
        case 'a'case 'b'case 'c'case 'd':
        case 'e'case 'f'case 'g'case 'h':
        case 'i'case 'j'case 'k'case 'l':
        case 'm'case 'n'case 'o'case 'p':
        case 'q'case 'r'case 's'case 't':
        case 'u'case 'v'case 'w'case 'x':
        case 'y'case 'z':
        {
          matchRange('a','z');
          break;
        }
        case 'A'case 'B'case 'C'case 'D':
        case 'E'case 'F'case 'G'case 'H':
        case 'I'case 'J'case 'K'case 'L':
        case 'M'case 'N'case 'O'case 'P':
        case 'Q'case 'R'case 'S'case 'T':
        case 'U'case 'V'case 'W'case 'X':
        case 'Y'case 'Z':
        {
          matchRange('A','Z');
          break;
        }
        case '0'case '1'case '2'case '3':
        case '4'case '5'case '6'case '7':
        case '8'case '9':
        {
          matchRange('0','9');
          break;
        }
        case '_':
        {
          match('_');
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
      }
      else {
View Full Code Here

TOP

Related Classes of persistence.antlr.NoViableAltForCharException

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.