Package persistence.antlr

Examples of persistence.antlr.NoViableAltForCharException


      text.setLength(_saveIndex);
    }
    else if ((_tokenSet_22.member(LA(1))) && (true) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    {
    switch ( LA(1)) {
    case '(':
    {
      match('(');
      {
      if ((_tokenSet_4.member(LA(1))) && (_tokenSet_23.member(LA(2))) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
        _saveIndex=text.length();
        mWS(false);
        text.setLength(_saveIndex);
      }
      else if ((_tokenSet_23.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
      {
      _loop689:
      do {
        if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
          mTEXT_ARG(false);
          {
          _loop688:
          do {
            if ((LA(1)==',')) {
              match(',');
              mTEXT_ARG(false);
            }
            else {
              break _loop688;
            }
           
          } while (true);
          }
        }
        else {
          break _loop689;
        }
       
      } while (true);
      }
      {
      switch ( LA(1)) {
      case '\t'case '\n'case '\r'case ' ':
      {
        _saveIndex=text.length();
        mWS(false);
        text.setLength(_saveIndex);
        break;
      }
      case ')':
      {
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
      match(')');
      break;
    }
    case '[':
    {
      {
      int _cnt694=0;
      _loop694:
      do {
        if ((LA(1)=='[')) {
          match('[');
          {
          if ((_tokenSet_4.member(LA(1))) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
            _saveIndex=text.length();
            mWS(false);
            text.setLength(_saveIndex);
          }
          else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
          }
          else {
            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
          }
         
          }
          mTEXT_ARG(false);
          {
          switch ( LA(1)) {
          case '\t'case '\n'case '\r'case ' ':
          {
            _saveIndex=text.length();
            mWS(false);
            text.setLength(_saveIndex);
            break;
          }
          case ']':
          {
            break;
          }
          default:
          {
            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
          }
          }
          }
          match(']');
        }
        else {
          if ( _cnt694>=1 ) { break _loop694; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
        }
       
        _cnt694++;
      } while (true);
      }
      break;
    }
    case '.':
    {
      match('.');
      mTEXT_ARG_ID_ELEMENT(false);
      break;
    }
    case '-':
    {
      match("->");
      mTEXT_ARG_ID_ELEMENT(false);
      break;
    }
    case '\t'case '\n'case '\r'case ' ':
    case '"'case '$'case '\''case ')':
    case '+'case ','case '0'case '1':
    case '2'case '3'case '4'case '5':
    case '6'case '7'case '8'case '9':
    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());
    }
    }
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
View Full Code Here


    do {
      if (((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_25.member(LA(2))) && (true)) {
        mDIGIT(false);
      }
      else {
        if ( _cnt734>=1 ) { break _loop734; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
     
      _cnt734++;
    } while (true);
    }
    {
    if ((LA(1)=='L') && (_tokenSet_26.member(LA(2))) && (true)) {
      match('L');
    }
    else if ((LA(1)=='l') && (_tokenSet_26.member(LA(2))) && (true)) {
      match('l');
    }
    else if ((LA(1)=='.')) {
      match('.');
      {
      _loop737:
      do {
        if (((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_26.member(LA(2))) && (true)) {
          mDIGIT(false);
        }
        else {
          break _loop737;
        }
       
      } while (true);
      }
    }
    else if ((_tokenSet_26.member(LA(1))) && (true) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
View Full Code Here

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

          mDIGIT(false);
        }
        else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
        }
        else {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
       
        }
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
      break;
    }
    case '4'case '5'case '6'case '7':
    {
      {
      matchRange('4','7');
      }
      {
      if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
        mDIGIT(false);
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
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 ( _cnt502>=1 ) { break _loop502; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
      }
      _cnt502++;
    } 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

      {
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
      mID(true);
      id=_returnToken;
     
            String idt = id.getText();
            String mapped = generator.mapTreeId(id.getText(), transInfo);
     
            // verify that it's not a preprocessor macro...
            if( mapped!=null && ! idt.equals( mapped ) )
            {
              text.setLength(_begin); text.append(mapped);
            }
            else
            {
              if(idt.equals("if") ||
                idt.equals("define") ||
                idt.equals("ifdef") ||
                idt.equals("ifndef") ||
                idt.equals("else") ||
                idt.equals("elif") ||
                idt.equals("endif") ||
                idt.equals("warning") ||
                idt.equals("error") ||
                idt.equals("ident") ||
                idt.equals("pragma") ||
                idt.equals("include"))
              {
                text.setLength(_begin); text.append("#"+idt);
              }
            }
         
      {
      if ((_tokenSet_4.member(LA(1))) && (true) && (true)) {
        mWS(false);
      }
      else {
      }
     
      }
      {
      if ((LA(1)=='=') && (true) && (true)) {
        mVAR_ASSIGN(false);
      }
      else {
      }
     
      }
    }
    else if ((LA(1)=='#') && (LA(2)=='[')) {
      _saveIndex=text.length();
      match('#');
      text.setLength(_saveIndex);
      mAST_CONSTRUCTOR(true);
      ctor=_returnToken;
    }
    else if ((LA(1)=='#') && (LA(2)=='#')) {
      match("##");
     
            if( currentRule != null )
            {
              String r = currentRule.getRuleName()+"_AST";
              text.setLength(_begin); text.append(r);
     
              if ( transInfo!=null ) {
                transInfo.refRuleRoot=r;  // we ref root of tree
              }
            }
            else
            {
              reportWarning("\"##\" not valid in this context");
              text.setLength(_begin); text.append("##");
            }
         
      {
      if ((_tokenSet_4.member(LA(1))) && (true) && (true)) {
        mWS(false);
      }
      else {
      }
     
      }
      {
      if ((LA(1)=='=') && (true) && (true)) {
        mVAR_ASSIGN(false);
      }
      else {
      }
     
      }
    }
    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 += "+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.erase(_begin); text += "+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("text.substr(_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

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.