Package persistence.antlr

Examples of persistence.antlr.NoViableAltForCharException


          mDIGIT(false);
        }
        else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true)) {
        }
        else {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
       
        }
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (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'))) {
        mDIGIT(false);
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true)) {
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
      break;
    }
    case 'u':
    {
      match('u');
      mXDIGIT(false);
      mXDIGIT(false);
      mXDIGIT(false);
      mXDIGIT(false);
      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


      matchRange('A','F');
      break;
    }
    default:
    {
      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

          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 ( _cnt623>=1 ) { break _loop623; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
      }
      _cnt623++;
    } 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("define"||
                idt.equals("undef")    ||
                idt.equals("if")    ||
                idt.equals("elif")    ||
                idt.equals("else")    ||
                idt.equals("endif")    ||
                idt.equals("line")    ||
                idt.equals("error")    ||
                idt.equals("warning"||
                idt.equals("region"||
                idt.equals("endregion"))
              {
                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.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.Length = _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("text.ToString(_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(
            generator.processStringForASTConstructor(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());
    }
    }
    }
    {
    _loop649:
    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(
                  generator.processStringForASTConstructor(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

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.