Package persistence.antlr

Examples of persistence.antlr.Token


    }
  }
}

  public final void mRULE_BLOCK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = RULE_BLOCK;
    int _saveIndex;
   
    match(':');
    {
    if ((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2)))) {
      _saveIndex=text.length();
      mWS(false);
      text.setLength(_saveIndex);
    }
    else if ((_tokenSet_2.member(LA(1))) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    mALT(false);
    {
    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());
    }
    }
    }
    {
    _loop306:
    do {
      if ((LA(1)=='|')) {
        match('|');
        {
        if ((_tokenSet_1.member(LA(1))) && (_tokenSet_2.member(LA(2)))) {
          _saveIndex=text.length();
          mWS(false);
          text.setLength(_saveIndex);
        }
        else if ((_tokenSet_2.member(LA(1))) && (true)) {
        }
        else {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
       
        }
        mALT(false);
        {
        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 {
        break _loop306;
      }
     
    } while (true);
    }
    match(';');
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here


    }
    _returnToken = _token;
  }
 
  public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = WS;
    int _saveIndex;
   
    {
    int _cnt348=0;
    _loop348:
    do {
      if ((LA(1)==' ') && (true)) {
        match(' ');
      }
      else if ((LA(1)=='\t') && (true)) {
        match('\t');
      }
      else if ((LA(1)=='\n'||LA(1)=='\r') && (true)) {
        mNEWLINE(false);
      }
      else {
        if ( _cnt348>=1 ) { break _loop348; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
     
      _cnt348++;
    } while (true);
    }
    _ttype = Token.SKIP;
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  protected final void mALT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ALT;
    int _saveIndex;
   
    {
    _loop317:
    do {
      if ((_tokenSet_3.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        mELEMENT(false);
      }
      else {
        break _loop317;
      }
     
    } while (true);
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mSUBRULE_BLOCK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = SUBRULE_BLOCK;
    int _saveIndex;
   
    match('(');
    {
    if ((_tokenSet_1.member(LA(1))) && (_tokenSet_0.member(LA(2)))) {
      mWS(false);
    }
    else if ((_tokenSet_0.member(LA(1))) && (true)) {
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    mALT(false);
    {
    _loop312:
    do {
      if ((_tokenSet_4.member(LA(1))) && (_tokenSet_0.member(LA(2)))) {
        {
        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('|');
        {
        if ((_tokenSet_1.member(LA(1))) && (_tokenSet_0.member(LA(2)))) {
          mWS(false);
        }
        else if ((_tokenSet_0.member(LA(1))) && (true)) {
        }
        else {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
       
        }
        mALT(false);
      }
      else {
        break _loop312;
      }
     
    } while (true);
    }
    {
    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(')');
    {
    if ((LA(1)=='=') && (LA(2)=='>')) {
      match("=>");
    }
    else if ((LA(1)=='*') && (true)) {
      match('*');
    }
    else if ((LA(1)=='+') && (true)) {
      match('+');
    }
    else if ((LA(1)=='?') && (true)) {
      match('?');
    }
    else {
    }
   
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  protected final void mELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ELEMENT;
    int _saveIndex;
   
    switch ( LA(1)) {
    case '/':
    {
      mCOMMENT(false);
      break;
    }
    case '{':
    {
      mACTION(false);
      break;
    }
    case '"':
    {
      mSTRING_LITERAL(false);
      break;
    }
    case '\'':
    {
      mCHAR_LITERAL(false);
      break;
    }
    case '(':
    {
      mSUBRULE_BLOCK(false);
      break;
    }
    case '\n'case '\r':
    {
      mNEWLINE(false);
      break;
    }
    default:
      if ((_tokenSet_5.member(LA(1)))) {
        {
        match(_tokenSet_5);
        }
      }
    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));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mCOMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = COMMENT;
    int _saveIndex;
   
    {
    if ((LA(1)=='/') && (LA(2)=='/')) {
      mSL_COMMENT(false);
    }
    else if ((LA(1)=='/') && (LA(2)=='*')) {
      mML_COMMENT(false);
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    _ttype = Token.SKIP;
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mACTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ACTION;
    int _saveIndex;
   
    match('{');
    {
    _loop378:
    do {
      // nongreedy exit test
      if ((LA(1)=='}') && (true)) break _loop378;
      if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        mNEWLINE(false);
      }
      else if ((LA(1)=='{') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        mACTION(false);
      }
      else if ((LA(1)=='\'') && (_tokenSet_6.member(LA(2)))) {
        mCHAR_LITERAL(false);
      }
      else if ((LA(1)=='/') && (LA(2)=='*'||LA(2)=='/')) {
        mCOMMENT(false);
      }
      else if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        mSTRING_LITERAL(false);
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        matchNot(EOF_CHAR);
      }
      else {
        break _loop378;
      }
     
    } while (true);
    }
    match('}');
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = STRING_LITERAL;
    int _saveIndex;
   
    match('"');
    {
    _loop363:
    do {
      if ((LA(1)=='\\')) {
        mESC(false);
      }
      else if ((_tokenSet_7.member(LA(1)))) {
        matchNot('"');
      }
      else {
        break _loop363;
      }
     
    } while (true);
    }
    match('"');
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mCHAR_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = CHAR_LITERAL;
    int _saveIndex;
   
    match('\'');
    {
    if ((LA(1)=='\\')) {
      mESC(false);
    }
    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 ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  protected final void mNEWLINE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = NEWLINE;
    int _saveIndex;
   
    {
    if ((LA(1)=='\r') && (LA(2)=='\n')) {
      match('\r');
      match('\n');
      newline();
    }
    else if ((LA(1)=='\r') && (true)) {
      match('\r');
      newline();
    }
    else if ((LA(1)=='\n')) {
      match('\n');
      newline();
    }
    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));
    }
    _returnToken = _token;
  }
View Full Code Here

TOP

Related Classes of persistence.antlr.Token

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.