Package persistence.antlr

Examples of persistence.antlr.Token


    }
    _returnToken = _token;
  }
 
  protected final void mTEXT_ARG_ELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = TEXT_ARG_ELEMENT;
    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'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':
    {
      mTEXT_ARG_ID_ELEMENT(false);
      break;
    }
    case '"':
    {
      mSTRING(false);
      break;
    }
    case '\'':
    {
      mCHAR(false);
      break;
    }
    case '0'case '1'case '2'case '3':
    case '4'case '5'case '6'case '7':
    case '8'case '9':
    {
      mINT_OR_FLOAT(false);
      break;
    }
    case '$':
    {
      mTEXT_ITEM(false);
      break;
    }
    case '+':
    {
      match('+');
      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;
  }
 
  protected final void mTEXT_ARG_ID_ELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = TEXT_ARG_ID_ELEMENT;
    int _saveIndex;
    Token id=null;
   
    mID(true);
    id=_returnToken;
    {
    if ((_tokenSet_4.member(LA(1))) && (_tokenSet_21.member(LA(2))) && (true)) {
View Full Code Here

    }
    _returnToken = _token;
  }
 
  protected final void mINT_OR_FLOAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = INT_OR_FLOAT;
    int _saveIndex;
   
    {
    int _cnt492=0;
    _loop492:
    do {
      if (((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_24.member(LA(2))) && (true)) {
        mDIGIT(false);
      }
      else {
        if ( _cnt492>=1 ) { break _loop492; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
     
      _cnt492++;
    } while (true);
    }
    {
    if ((LA(1)=='L') && (_tokenSet_25.member(LA(2))) && (true)) {
      match('L');
    }
    else if ((LA(1)=='l') && (_tokenSet_25.member(LA(2))) && (true)) {
      match('l');
    }
    else if ((LA(1)=='.')) {
      match('.');
      {
      _loop495:
      do {
        if (((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_25.member(LA(2))) && (true)) {
          mDIGIT(false);
        }
        else {
          break _loop495;
        }
       
      } while (true);
      }
    }
    else if ((_tokenSet_25.member(LA(1))) && (true) && (true)) {
    }
    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;
  }
 
  protected final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = SL_COMMENT;
    int _saveIndex;
   
    match("//");
    {
    _loop469:
    do {
      // nongreedy exit test
      if ((LA(1)=='\n'||LA(1)=='\r') && (true) && (true)) break _loop469;
      if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
        matchNot(EOF_CHAR);
      }
      else {
        break _loop469;
      }
     
    } while (true);
    }
    {
    if ((LA(1)=='\r') && (LA(2)=='\n') && (true)) {
      match("\r\n");
    }
    else if ((LA(1)=='\n')) {
      match('\n');
    }
    else if ((LA(1)=='\r') && (true) && (true)) {
      match('\r');
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    }
    newline();
    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 mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ML_COMMENT;
    int _saveIndex;
   
    match("/*");
    {
    _loop473:
    do {
      // nongreedy exit test
      if ((LA(1)=='*') && (LA(2)=='/') && (true)) break _loop473;
      if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
        match('\r');
        match('\n');
        newline();
      }
      else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
        match('\r');
        newline();
      }
      else if ((LA(1)=='\n') && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
        match('\n');
        newline();
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff'))) {
        matchNot(EOF_CHAR);
      }
      else {
        break _loop473;
      }
     
    } 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 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 '"':
    {
      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) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
        mDIGIT(false);
        {
        if (((LA(1) >= '0' && LA(1) <= '9')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && (true)) {
          mDIGIT(false);
        }
        else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
        }
        else {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
       
        }
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (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')) && (true)) {
        mDIGIT(false);
      }
      else if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && (true) && (true)) {
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
      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;
  }
 
  protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = DIGIT;
    int _saveIndex;
   
    matchRange('0','9');
    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

    }
  }
 
  public final void tree() throws RecognitionException, TokenStreamException {
   
    Token  lp = null;
   
    lp = LT(1);
    match(TREE_BEGIN);
    if ( inputState.guessing==0 ) {
      behavior.beginTree(lp);
View Full Code Here

    }
  }
 
  public final void rootNode() throws RecognitionException, TokenStreamException {
   
    Token label = null;
   
    {
    if ((LA(1)==TOKEN_REF||LA(1)==RULE_REF) && (LA(2)==COLON)) {
      label=id();
      match(COLON);
View Full Code Here

  literals.put(new ANTLRHashString("tokens", this), new Integer(4));
  literals.put(new ANTLRHashString("exception", this), new Integer(25));
}

public Token nextToken() throws TokenStreamException {
  Token theRetToken=null;
tryAgain:
  for (;;) {
    Token _token = null;
    int _ttype = Token.INVALID_TYPE;
    resetText();
    try {   // for char stream error handling
      try {   // for lexical error handling
        switch ( LA(1)) {
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.