Package org.jacorb.notification.filter.etcl

Source Code of org.jacorb.notification.filter.etcl.TCLLexer

// $ANTLR 2.7.2: "tcl-lexer.g" -> "TCLLexer.java"$

package org.jacorb.notification.filter.etcl;

/*
*        JacORB - a free Java ORB
*
*   Copyright (C) 1999-2005 Gerald Brose
*
*   This library is free software; you can redistribute it and/or
*   modify it under the terms of the GNU Library General Public
*   License as published by the Free Software Foundation; either
*   version 2 of the License, or (at your option) any later version.
*
*   This library is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*   Library General Public License for more details.
*
*   You should have received a copy of the GNU Library General Public
*   License along with this library; if not, write to the Free
*   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/

import java.io.InputStream;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.TokenStreamRecognitionException;
import antlr.CharStreamException;
import antlr.CharStreamIOException;
import antlr.ANTLRException;
import java.io.Reader;
import java.util.Hashtable;
import antlr.CharScanner;
import antlr.InputBuffer;
import antlr.ByteBuffer;
import antlr.CharBuffer;
import antlr.Token;
import antlr.CommonToken;
import antlr.RecognitionException;
import antlr.NoViableAltForCharException;
import antlr.MismatchedCharException;
import antlr.TokenStream;
import antlr.ANTLRHashString;
import antlr.LexerSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.SemanticException;

    import antlr.TokenStreamSelector;

public class TCLLexer extends antlr.CharScanner implements TCLLexerTokenTypes, TokenStream
{

    public static final String LEXER_NAME = "component";

    TokenStreamSelector tokenStreamSelector;

    void setTokenStreamSelector(TokenStreamSelector s) {
        tokenStreamSelector = s;
    }

    // switch to Component Lexer
    void toggleLexer() {
        tokenStreamSelector.select(ComponentLexer.LEXER_NAME);
    }
public TCLLexer(InputStream in) {
  this(new ByteBuffer(in));
}
public TCLLexer(Reader in) {
  this(new CharBuffer(in));
}
public TCLLexer(InputBuffer ib) {
  this(new LexerSharedInputState(ib));
}
public TCLLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(true);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("min", this), new Integer(39));
  literals.put(new ANTLRHashString("random", this), new Integer(42));
  literals.put(new ANTLRHashString("exist", this), new Integer(5));
  literals.put(new ANTLRHashString("and", this), new Integer(7));
  literals.put(new ANTLRHashString("first", this), new Integer(43));
  literals.put(new ANTLRHashString("type", this), new Integer(44));
  literals.put(new ANTLRHashString("in", this), new Integer(10));
  literals.put(new ANTLRHashString("FALSE", this), new Integer(14));
  literals.put(new ANTLRHashString("TRUE", this), new Integer(13));
  literals.put(new ANTLRHashString("or", this), new Integer(8));
  literals.put(new ANTLRHashString("max", this), new Integer(40));
  literals.put(new ANTLRHashString("default", this), new Integer(38));
  literals.put(new ANTLRHashString("with", this), new Integer(41));
  literals.put(new ANTLRHashString("not", this), new Integer(9));
}

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)) {
        case '\t'case '\n'case '\u000c'case '\r':
        case ' ':
        {
          mWS(true);
          theRetToken=_returnToken;
          break;
        }
        case '=':
        {
          mEQ(true);
          theRetToken=_returnToken;
          break;
        }
        case '!':
        {
          mNEQ(true);
          theRetToken=_returnToken;
          break;
        }
        case '~':
        {
          mSUBSTR(true);
          theRetToken=_returnToken;
          break;
        }
        case '+':
        {
          mPLUS(true);
          theRetToken=_returnToken;
          break;
        }
        case '-':
        {
          mMINUS(true);
          theRetToken=_returnToken;
          break;
        }
        case '*':
        {
          mMULT(true);
          theRetToken=_returnToken;
          break;
        }
        case '/':
        {
          mDIV(true);
          theRetToken=_returnToken;
          break;
        }
        case '(':
        {
          mLPAREN(true);
          theRetToken=_returnToken;
          break;
        }
        case ')':
        {
          mRPAREN(true);
          theRetToken=_returnToken;
          break;
        }
        case '$':
        {
          mDOLLAR(true);
          theRetToken=_returnToken;
          break;
        }
        case '\'':
        {
          mSTRING(true);
          theRetToken=_returnToken;
          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'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':
        {
          mIDENTIFIER(true);
          theRetToken=_returnToken;
          break;
        }
        case '.'case '0'case '1'case '2':
        case '3'case '4'case '5'case '6':
        case '7'case '8'case '9':
        {
          mNUMBER(true);
          theRetToken=_returnToken;
          break;
        }
        default:
          if ((LA(1)=='<') && (LA(2)=='=')) {
            mLTE(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='>') && (LA(2)=='=')) {
            mGTE(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='<') && (true)) {
            mLT(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='>') && (true)) {
            mGT(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);
        return _returnToken;
      }
      catch (RecognitionException e) {
        throw new TokenStreamRecognitionException(e);
      }
    }
    catch (CharStreamException cse) {
      if ( cse instanceof CharStreamIOException ) {
        throw new TokenStreamIOException(((CharStreamIOException)cse).io);
      }
      else {
        throw new TokenStreamException(cse.getMessage());
      }
    }
  }
}

  public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = WS;
    int _saveIndex;
   
    {
    switch ( LA(1)) {
    case ' ':
    {
      match(' ');
      break;
    }
    case '\t':
    {
      match('\t');
      break;
    }
    case '\u000c':
    {
      match('\f');
      break;
    }
    case '\n'case '\r':
    {
      {
      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());
      }
     
      }
      newline();
      break;
    }
    default:
    {
      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;
  }
 
  public final void mEQ(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = EQ;
    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;
  }
 
  public final void mNEQ(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = NEQ;
    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;
  }
 
  public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = LT;
    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;
  }
 
  public final void mLTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = LTE;
    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;
  }
 
  public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = GT;
    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;
  }
 
  public final void mGTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = GTE;
    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;
  }
 
  public final void mSUBSTR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = SUBSTR;
    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;
  }
 
  public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = PLUS;
    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;
  }
 
  public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = MINUS;
    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;
  }
 
  public final void mMULT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = MULT;
    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;
  }
 
  public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = DIV;
    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;
  }
 
  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;
  }
 
  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;
  }
 
  public final void mDOLLAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = DOLLAR;
    int _saveIndex;
   
    match('$');
    toggleLexer();
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
 
  public final void mSTRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = STRING;
    int _saveIndex;
   
    _saveIndex=text.length();
    match('\'');
    text.setLength(_saveIndex);
    mTEXTCHARS(false);
    _saveIndex=text.length();
    match('\'');
    text.setLength(_saveIndex);
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
 
  protected final void mTEXTCHARS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = TEXTCHARS;
    int _saveIndex;
   
    switch ( LA(1)) {
    case '\'':
    {
      break;
    }
    case ' 'case '!'case '"'case '#':
    case '$'case '%'case '&'case '(':
    case ')'case '*'case '+'case ',':
    case '-'case '.'case '/'case '0':
    case '1'case '2'case '3'case '4':
    case '5'case '6'case '7'case '8':
    case '9'case ':'case ';'case '<':
    case '='case '>'case '?'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'case '['case '\\':
    case ']'case '^'case '_'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'case '{'case '|':
    case '}'case '~':
    {
      mTEXTCHAR(false);
      mTEXTCHARS(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;
  }
 
  public final void mIDENTIFIER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = IDENTIFIER;
    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 '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':
    {
      mLEADER(false);
      mFOLLOWSEQ(false);
      break;
    }
    case '\\':
    {
      match('\\');
      mLEADER(false);
      mFOLLOWSEQ(false);
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    _ttype = testLiteralsTable(_ttype);
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
 
  protected final void mLEADER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = LEADER;
    int _saveIndex;
   
    mALPHA(false);
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
 
  protected final void mFOLLOWSEQ(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = FOLLOWSEQ;
    int _saveIndex;
   
    if ((_tokenSet_0.member(LA(1)))) {
      mFOLLOW(false);
      mFOLLOWSEQ(false);
    }
    else {
    }
   
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
 
  protected final void mFOLLOW(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = FOLLOW;
    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 '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':
    {
      mALPHA(false);
      break;
    }
    case '0'case '1'case '2'case '3':
    case '4'case '5'case '6'case '7':
    case '8'case '9':
    {
      mDIGIT(false);
      break;
    }
    case '/'case ':'case '_':
    {
      mOTHER(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;
  }
 
  protected final void mALPHA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ALPHA;
    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;
    }
    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;
  }
 
  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;
  }
 
  protected final void mOTHER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = OTHER;
    int _saveIndex;
   
    {
    switch ( LA(1)) {
    case '_':
    {
      match('_');
      break;
    }
    case ':':
    {
      match(':');
      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;
  }
 
  public final void mNUMBER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = NUMBER;
    int _saveIndex;
    boolean isDecimal=false;
   
    switch ( LA(1)) {
    case '.':
    {
      match('.');
      _ttype = DOT;
      {
      if (((LA(1) >= '0' && LA(1) <= '9'))) {
        {
        {
        int _cnt27=0;
        _loop27:
        do {
          if (((LA(1) >= '0' && LA(1) <= '9'))) {
            mDIGIT(false);
          }
          else {
            if ( _cnt27>=1 ) { break _loop27; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
          }
         
          _cnt27++;
        } while (true);
        }
        _ttype = NUM_FLOAT;
        }
        {
        if ((LA(1)=='E'||LA(1)=='e')) {
          {
          mEXPONENT(false);
          }
        }
        else {
        }
       
        }
      }
      else {
      }
     
      }
      break;
    }
    case '0'case '1'case '2'case '3':
    case '4'case '5'case '6'case '7':
    case '8'case '9':
    {
      {
      switch ( LA(1)) {
      case '0':
      {
        match('0');
        isDecimal = true;
        break;
      }
      case '1'case '2'case '3'case '4':
      case '5'case '6'case '7'case '8':
      case '9':
      {
        {
        matchRange('1','9');
        }
        {
        _loop33:
        do {
          if (((LA(1) >= '0' && LA(1) <= '9'))) {
            mDIGIT(false);
          }
          else {
            break _loop33;
          }
         
        } while (true);
        }
        isDecimal=true;
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
      {
      if (((LA(1)=='.'||LA(1)=='E'||LA(1)=='e'))&&(isDecimal)) {
        {
        switch ( LA(1)) {
        case '.':
        {
          match('.');
          {
          _loop37:
          do {
            if (((LA(1) >= '0' && LA(1) <= '9'))) {
              mDIGIT(false);
            }
            else {
              break _loop37;
            }
           
          } 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());
        }
        }
        }
        _ttype = NUM_FLOAT;
      }
      else {
      }
     
      }
      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;
  }
 
  protected final void mEXPONENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = EXPONENT;
    int _saveIndex;
   
    {
    switch ( LA(1)) {
    case 'e':
    {
      match('e');
      break;
    }
    case 'E':
    {
      match('E');
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    {
    switch ( LA(1)) {
    case '+':
    {
      match('+');
      break;
    }
    case '-':
    {
      match('-');
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    }
    {
    int _cnt43=0;
    _loop43:
    do {
      if (((LA(1) >= '0' && LA(1) <= '9'))) {
        mDIGIT(false);
      }
      else {
        if ( _cnt43>=1 ) { break _loop43; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
     
      _cnt43++;
    } while (true);
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
 
  protected final void mTEXTCHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = TEXTCHAR;
    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 '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':
    {
      mALPHA(false);
      break;
    }
    case '0'case '1'case '2'case '3':
    case '4'case '5'case '6'case '7':
    case '8'case '9':
    {
      mDIGIT(false);
      break;
    }
    case '/'case ':'case '_':
    {
      mOTHER(false);
      break;
    }
    case '!'case '"'case '#'case '$':
    case '%'case '&'case '('case ')':
    case '*'case '+'case ','case '-':
    case '.'case ';'case '<'case '=':
    case '>'case '?'case '@'case '[':
    case ']'case '^'case '`'case '{':
    case '|'case '}'case '~':
    {
      mOTHER_TEXT(false);
      break;
    }
    case ' ':
    {
      match(' ');
      break;
    }
    case '\\':
    {
      mSPECIAL(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;
  }
 
  protected final void mOTHER_TEXT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = OTHER_TEXT;
    int _saveIndex;
   
    {
    switch ( LA(1)) {
    case '.':
    {
      match('.');
      break;
    }
    case '!':
    {
      match('!');
      break;
    }
    case '"':
    {
      match('"');
      break;
    }
    case '#':
    {
      match('#');
      break;
    }
    case '$':
    {
      match('$');
      break;
    }
    case '%':
    {
      match('%');
      break;
    }
    case '&':
    {
      match('&');
      break;
    }
    case '(':
    {
      match('(');
      break;
    }
    case ')':
    {
      match(')');
      break;
    }
    case '*':
    {
      match('*');
      break;
    }
    case '+':
    {
      match('+');
      break;
    }
    case ',':
    {
      match(',');
      break;
    }
    case '-':
    {
      match('-');
      break;
    }
    case ';':
    {
      match(';');
      break;
    }
    case '<':
    {
      match('<');
      break;
    }
    case '>':
    {
      match('>');
      break;
    }
    case '=':
    {
      match('=');
      break;
    }
    case '?':
    {
      match('?');
      break;
    }
    case '@':
    {
      match('@');
      break;
    }
    case '[':
    {
      match('[');
      break;
    }
    case ']':
    {
      match(']');
      break;
    }
    case '^':
    {
      match('^');
      break;
    }
    case '`':
    {
      match('`');
      break;
    }
    case '{':
    {
      match('{');
      break;
    }
    case '|':
    {
      match('|');
      break;
    }
    case '}':
    {
      match('}');
      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;
  }
 
  protected final void mSPECIAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = SPECIAL;
    int _saveIndex;
   
    _saveIndex=text.length();
    match('\\');
    text.setLength(_saveIndex);
    {
    switch ( LA(1)) {
    case '\'':
    {
      match('\'');
      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;
  }
 
  protected final void mDIGITS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = DIGITS;
    int _saveIndex;
   
    {
    int _cnt48=0;
    _loop48:
    do {
      if (((LA(1) >= '0' && LA(1) <= '9'))) {
        mDIGIT(false);
      }
      else {
        if ( _cnt48>=1 ) { break _loop48; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
      }
     
      _cnt48++;
    } while (true);
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
 
 
  private static final long[] mk_tokenSet_0() {
    long[] data = { 576320014815068160L, 576460745995190270L, 0L, 0L, 0L};
    return data;
  }
  public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
 
  }
TOP

Related Classes of org.jacorb.notification.filter.etcl.TCLLexer

TOP
Copyright © 2018 www.massapi.com. 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.