Package org.jostraca.comp.antlr

Examples of org.jostraca.comp.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 mOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = OR;
    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 mWILDCARD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = WILDCARD;
    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 mRANGE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = RANGE;
    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 mNOT_OP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = NOT_OP;
    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 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_1.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 mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ESC;
    int _saveIndex;
   
    match('\\');
    {
    switch ( LA(1)) {
    case 'n':
    {
      match('n');
      break;
    }
    case 'r':
    {
      match('r');
      break;
    }
    case 't':
    {
      match('t');
      break;
    }
    case 'b':
    {
      match('b');
      break;
    }
    case 'f':
    {
      match('f');
      break;
    }
    case 'w':
    {
      match('w');
      break;
    }
    case 'a':
    {
      match('a');
      break;
    }
    case '"':
    {
      match('"');
      break;
    }
    case '\'':
    {
      match('\'');
      break;
    }
    case '\\':
    {
      match('\\');
      break;
    }
    case '0'case '1'case '2'case '3':
    {
      {
      matchRange('0','3');
      }
      {
      if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        matchRange('0','7');
        {
        if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
          matchRange('0','7');
        }
        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) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
        matchRange('0','7');
      }
      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);
      _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('"');
    {
    _loop184:
    do {
      if ((LA(1)=='\\')) {
        mESC(false);
      }
      else if ((_tokenSet_2.member(LA(1)))) {
        matchNot('"');
      }
      else {
        break _loop184;
      }
     
    } 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;
  }
 
  protected final void mXDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = XDIGIT;
    int _saveIndex;
   
    switch ( LA(1)) {
    case '0'case '1'case '2'case '3':
    case '4'case '5'case '6'case '7':
    case '8'case '9':
    {
      matchRange('0','9');
      break;
    }
    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;
    }
    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));
    }
    _returnToken = _token;
  }
View Full Code Here

TOP

Related Classes of org.jostraca.comp.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.