Package persistence.antlr

Examples of persistence.antlr.Token


    }
    _returnToken = _token;
  }
 
  public final void mBANG(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = BANG;
    int _saveIndex;
   
    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 mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = SEMI;
    int _saveIndex;
   
    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 mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = COMMA;
    int _saveIndex;
   
    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 mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = RCURLY;
    int _saveIndex;
   
    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 mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = LPAREN;
    int _saveIndex;
   
    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 mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = RPAREN;
    int _saveIndex;
   
    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

*  block and an action).  We do not want "header" to go back
*  to the parser as a simple keyword...it must pick off
*  the action afterwards.
*/
  public final void mID_OR_KEYWORD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ID_OR_KEYWORD;
    int _saveIndex;
    Token id=null;
   
    mID(true);
    id=_returnToken;
    _ttype = id.getType();
    {
    if (((_tokenSet_9.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')))&&(id.getText().equals("header"))) {
      {
      if ((_tokenSet_1.member(LA(1))) && (_tokenSet_9.member(LA(2)))) {
        mWS(false);
      }
      else if ((_tokenSet_9.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
      {
      switch ( LA(1)) {
      case '"':
      {
        mSTRING_LITERAL(false);
        break;
      }
      case '\t'case '\n'case '\r'case ' ':
      case '/'case '{':
      {
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
      {
      _loop331:
      do {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
        {
          mWS(false);
          break;
        }
        case '/':
        {
          mCOMMENT(false);
          break;
        }
        default:
        {
          break _loop331;
        }
        }
      } while (true);
      }
      mACTION(false);
      _ttype = HEADER_ACTION;
    }
    else if (((_tokenSet_10.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')))&&(id.getText().equals("tokens"))) {
      {
      _loop333:
      do {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
        {
          mWS(false);
          break;
        }
        case '/':
        {
          mCOMMENT(false);
          break;
        }
        default:
        {
          break _loop333;
        }
        }
      } while (true);
      }
      mCURLY_BLOCK_SCARF(false);
      _ttype = TOKENS_SPEC;
    }
    else if (((_tokenSet_10.member(LA(1))) && (true))&&(id.getText().equals("options"))) {
      {
      _loop335:
      do {
        switch ( LA(1)) {
        case '\t'case '\n'case '\r'case ' ':
View Full Code Here

    }
    _returnToken = _token;
  }
 
  protected final void mID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ID;
    int _saveIndex;
   
    {
    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 '_':
    {
      match('_');
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    {
    _loop342:
    do {
      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 '_':
      {
        match('_');
        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;
      }
      default:
      {
        break _loop342;
      }
      }
    } while (true);
    }
    _ttype = testLiteralsTable(new String(text.getBuffer(),_begin,text.length()-_begin),_ttype);
    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 mCURLY_BLOCK_SCARF(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = CURLY_BLOCK_SCARF;
    int _saveIndex;
   
    match('{');
    {
    _loop338:
    do {
      // nongreedy exit test
      if ((LA(1)=='}') && (true)) break _loop338;
      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'))) {
        mSTRING_LITERAL(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) >= '\u0003' && LA(1) <= '\u00ff')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        matchNot(EOF_CHAR);
      }
      else {
        break _loop338;
      }
     
    } 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 mASSIGN_RHS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ASSIGN_RHS;
    int _saveIndex;
   
    _saveIndex=text.length();
    match('=');
    text.setLength(_saveIndex);
    {
    _loop345:
    do {
      // nongreedy exit test
      if ((LA(1)==';') && (true)) break _loop345;
      if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        mSTRING_LITERAL(false);
      }
      else if ((LA(1)=='\'') && (_tokenSet_6.member(LA(2)))) {
        mCHAR_LITERAL(false);
      }
      else if ((LA(1)=='\n'||LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        mNEWLINE(false);
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        matchNot(EOF_CHAR);
      }
      else {
        break _loop345;
      }
     
    } 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

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.