Package antlr

Examples of antlr.NoViableAltForCharException


      match('$');
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    {
    _loop374:
View Full Code Here


      {
      match(_tokenSet_6);
      }
    }
    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());
        }
        }
        }
      }
      else if ((_tokenSet_8.member(LA(1)))) {
View Full Code Here

            mWhitespace(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 (((LA(1) >= '\u007f' && LA(1) <= '\u00ff'))) {
          matchRange('\177','\377');
        }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
    }
    else if ((LA(1)=='\n'||LA(1)=='\r') && (true)) {
      {
      switch ( LA(1)) {
      case '\n':
      {
        match('\n');
        break;
      }
      case '\r':
      {
        match('\r');
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
      if ( inputState.guessing==0 ) {
        newline();
      }
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    if ( inputState.guessing==0 ) {
      _ttype = Token.SKIP;
View Full Code Here

          match('\n');
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        if ( inputState.guessing==0 ) {
          deferredNewline();
View Full Code Here

              match('\014');
              break;
            }
            default:
            {
              if ( _cnt279>=1 ) { break _loop279; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
            }
            }
            _cnt279++;
          } while (true);
          }
View Full Code Here

    {
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    {
    int _cnt288=0;
    _loop288:
    do {
      if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ')) {
        mSpace(false);
      }
      else {
        if ( _cnt288>=1 ) { break _loop288; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
     
      _cnt288++;
    } while (true);
    }
    mNumber(true);
    n=_returnToken;
    if ( inputState.guessing==0 ) {
      lineObject.setLine(Integer.parseInt(n.getText()));
    }
    {
    int _cnt290=0;
    _loop290:
    do {
      if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
        mSpace(false);
      }
      else {
        if ( _cnt290>=1 ) { break _loop290; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
     
      _cnt290++;
    } while (true);
    }
    {
    if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
      mStringLiteral(true);
      fn=_returnToken;
      if ( inputState.guessing==0 ) {
        try {
        lineObject.setSource(fn.getText().substring(1,fn.getText().length()-1));
        }
        catch (StringIndexOutOfBoundsException e) { /*not possible*/ }
       
      }
    }
    else if ((_tokenSet_7.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
      mID(true);
      fi=_returnToken;
      if ( inputState.guessing==0 ) {
        lineObject.setSource(fi.getText());
      }
    }
    else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    {
    _loop293:
    do {
      if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
        mSpace(false);
      }
      else {
        break _loop293;
      }
     
    } while (true);
    }
    {
    if ((LA(1)=='1') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
      match("1");
      if ( inputState.guessing==0 ) {
        lineObject.setEnteringFile(true);
      }
    }
    else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    {
    _loop296:
    do {
      if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
        mSpace(false);
      }
      else {
        break _loop296;
      }
     
    } while (true);
    }
    {
    if ((LA(1)=='2') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
      match("2");
      if ( inputState.guessing==0 ) {
        lineObject.setReturningToFile(true);
      }
    }
    else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    {
    _loop299:
    do {
      if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
        mSpace(false);
      }
      else {
        break _loop299;
      }
     
    } while (true);
    }
    {
    if ((LA(1)=='3') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
      match("3");
      if ( inputState.guessing==0 ) {
        lineObject.setSystemHeader(true);
      }
    }
    else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    {
    _loop302:
    do {
      if ((LA(1)=='\t'||LA(1)=='\u000c'||LA(1)==' ') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
        mSpace(false);
      }
      else {
        break _loop302;
      }
     
    } while (true);
    }
    {
    if ((LA(1)=='4') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
      match("4");
      if ( inputState.guessing==0 ) {
        lineObject.setTreatAsC(true);
      }
    }
    else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    {
    _loop306:
    do {
      if ((_tokenSet_8.member(LA(1)))) {
        {
        match(_tokenSet_8);
        }
      }
      else {
        break _loop306;
      }
     
    } while (true);
    }
    {
    if ((LA(1)=='\r') && (LA(2)=='\n')) {
      match("\r\n");
    }
    else if ((LA(1)=='\r') && (true)) {
      match("\r");
    }
    else if ((LA(1)=='\n')) {
      match("\n");
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    if ( inputState.guessing==0 ) {
     
View Full Code Here

      match('\014');
      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'))) {
            mDigit(false);
          }
          else {
            if ( _cnt350>=1 ) { break _loop350; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
          }
         
          _cnt350++;
        } while (true);
        }
        {
        switch ( LA(1)) {
        case '.':
        {
          match('.');
          break;
        }
        case 'e':
        {
          match('e');
          break;
        }
        case 'E':
        {
          match('E');
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        }
      }
      catch (RecognitionException pe) {
        synPredMatched352 = false;
      }
      rewind(_m352);
      inputState.guessing--;
    }
    if ( synPredMatched352 ) {
      {
      int _cnt354=0;
      _loop354:
      do {
        if (((LA(1) >= '0' && LA(1) <= '9'))) {
          mDigit(false);
        }
        else {
          if ( _cnt354>=1 ) { break _loop354; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
        }
       
        _cnt354++;
      } while (true);
      }
      {
      switch ( LA(1)) {
      case '.':
      {
        match('.');
        {
        _loop357:
        do {
          if (((LA(1) >= '0' && LA(1) <= '9'))) {
            mDigit(false);
          }
          else {
            break _loop357;
          }
         
        } while (true);
        }
        {
        if ((LA(1)=='E'||LA(1)=='e')) {
          mExponent(false);
        }
        else {
        }
       
        }
        break;
      }
      case 'E'case 'e':
      {
        mExponent(false);
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
      if ( inputState.guessing==0 ) {
        _ttype = DoubleDoubleConst;
      }
      {
      switch ( LA(1)) {
      case 'F'case 'f':
      {
        mFloatSuffix(false);
        if ( inputState.guessing==0 ) {
          _ttype = FloatDoubleConst;
        }
        break;
      }
      case 'L'case 'l':
      {
        mLongSuffix(false);
        if ( inputState.guessing==0 ) {
          _ttype = LongDoubleConst;
        }
        break;
      }
      default:
        {
        }
      }
      }
    }
    else {
      boolean synPredMatched361 = false;
      if (((LA(1)=='.') && (LA(2)=='.'))) {
        int _m361 = mark();
        synPredMatched361 = true;
        inputState.guessing++;
        try {
          {
          match("...");
          }
        }
        catch (RecognitionException pe) {
          synPredMatched361 = false;
        }
        rewind(_m361);
        inputState.guessing--;
      }
      if ( synPredMatched361 ) {
        match("...");
        if ( inputState.guessing==0 ) {
          _ttype = VARARGS;
        }
      }
      else if ((LA(1)=='0') && (LA(2)=='X'||LA(2)=='x')) {
        match('0');
        {
        switch ( LA(1)) {
        case 'x':
        {
          match('x');
          break;
        }
        case 'X':
        {
          match('X');
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        {
        int _cnt375=0;
        _loop375:
        do {
          switch ( LA(1)) {
          case 'a'case 'b'case 'c'case 'd':
          case 'e'case 'f':
          {
            matchRange('a','f');
            break;
          }
          case 'A'case 'B'case 'C'case 'D':
          case 'E'case 'F':
          {
            matchRange('A','F');
            break;
          }
          case '0'case '1'case '2'case '3':
          case '4'case '5'case '6'case '7':
          case '8'case '9':
          {
            mDigit(false);
            break;
          }
          default:
          {
            if ( _cnt375>=1 ) { break _loop375; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
          }
          }
          _cnt375++;
        } while (true);
        }
        if ( inputState.guessing==0 ) {
          _ttype = IntHexConst;
        }
        {
        switch ( LA(1)) {
        case 'L'case 'l':
        {
          mLongSuffix(false);
          if ( inputState.guessing==0 ) {
            _ttype = LongHexConst;
          }
          break;
        }
        case 'U'case 'u':
        {
          mUnsignedSuffix(false);
          if ( inputState.guessing==0 ) {
            _ttype = UnsignedHexConst;
          }
          break;
        }
        default:
          {
          }
        }
        }
      }
      else if ((LA(1)=='.') && (true)) {
        match('.');
        if ( inputState.guessing==0 ) {
          _ttype = DOT;
        }
        {
        if (((LA(1) >= '0' && LA(1) <= '9'))) {
          {
          int _cnt364=0;
          _loop364:
          do {
            if (((LA(1) >= '0' && LA(1) <= '9'))) {
              mDigit(false);
            }
            else {
              if ( _cnt364>=1 ) { break _loop364; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
            }
           
            _cnt364++;
          } while (true);
          }
          {
          if ((LA(1)=='E'||LA(1)=='e')) {
            mExponent(false);
          }
          else {
          }
         
          }
          if ( inputState.guessing==0 ) {
            _ttype = DoubleDoubleConst;
          }
          {
          switch ( LA(1)) {
          case 'F'case 'f':
          {
            mFloatSuffix(false);
            if ( inputState.guessing==0 ) {
              _ttype = FloatDoubleConst;
            }
            break;
          }
          case 'L'case 'l':
          {
            mLongSuffix(false);
            if ( inputState.guessing==0 ) {
              _ttype = LongDoubleConst;
            }
            break;
          }
          default:
            {
            }
          }
          }
        }
        else {
        }
       
        }
      }
      else if ((LA(1)=='0') && (true) && (true)) {
        match('0');
        {
        _loop368:
        do {
          if (((LA(1) >= '0' && LA(1) <= '7'))) {
            matchRange('0','7');
          }
          else {
            break _loop368;
          }
         
        } while (true);
        }
        if ( inputState.guessing==0 ) {
          _ttype = IntOctalConst;
        }
        {
        switch ( LA(1)) {
        case 'L'case 'l':
        {
          mLongSuffix(false);
          if ( inputState.guessing==0 ) {
            _ttype = LongOctalConst;
          }
          break;
        }
        case 'U'case 'u':
        {
          mUnsignedSuffix(false);
          if ( inputState.guessing==0 ) {
            _ttype = UnsignedOctalConst;
          }
          break;
        }
        default:
          {
          }
        }
        }
      }
      else if (((LA(1) >= '1' && LA(1) <= '9')) && (true) && (true)) {
        matchRange('1','9');
        {
        _loop371:
        do {
          if (((LA(1) >= '0' && LA(1) <= '9'))) {
            mDigit(false);
          }
          else {
            break _loop371;
          }
         
        } while (true);
        }
        if ( inputState.guessing==0 ) {
          _ttype = IntIntConst;
        }
        {
        switch ( LA(1)) {
        case 'L'case 'l':
        {
          mLongSuffix(false);
          if ( inputState.guessing==0 ) {
            _ttype = LongIntConst;
          }
          break;
        }
        case 'U'case 'u':
        {
          mUnsignedSuffix(false);
          if ( inputState.guessing==0 ) {
            _ttype = UnsignedIntConst;
          }
          break;
        }
        default:
          {
          }
        }
        }
      }
      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 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.