Package org.openquark.cal.compiler

Source Code of org.openquark.cal.compiler.CALLexer

// $ANTLR 2.7.6 (2005-12-22): "CAL.g" -> "CALLexer.java"$

// Package declaration
package org.openquark.cal.compiler;

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;

/***************************************
* CAL lexical definition starts here *  
***************************************/
@SuppressWarnings(\u0022all\u0022) final class CALLexer extends antlr.CharScanner implements CALTokenTypes, TokenStream
{

    // Add declarations for CALLexer class here

    /** The multiplexed lexer that owns this instance. */
    private CALMultiplexedLexer parentMultiLexer = null;
   
       
    /**
     * This instance of the CALLexer is only used for its isKeyword method. Attempts
     * to use it for actually lexing CAL source may result in NullPointerExceptions,
     * as it does not have a proper input stream nor a reference to a CALMultiplexedLexer.
     */
    private static final CALLexer keywordsLexer = new CALLexer ((LexerSharedInputState)null);
   
   
    /**
     * Construct CALLexer from a CALCompiler   
     * @param parent
     * @param in
     */
    public CALLexer(CALMultiplexedLexer parent, Reader in) {
        this (in);
        if (parent == null) {
            throw new NullPointerException();
        }
        parentMultiLexer = parent;
       
        //tab stops in our source CAL files as well as in the code gem are set to 4
        //this affects column information for error messages, as well as syntax
        //highlighting in the code gem.
        setTabSize(CALMultiplexedLexer.TAB_SIZE);

        // Use our custom token class.
        String tokenClassName = CALToken.class.getName();
        setTokenObjectClass(tokenClassName);
    }

    /**
     * Override reportError method to direct standard error handling through to the CALCompiler error scheme
     * @param ex RecognitionException the recognition exception that originated the problem
     */
    public void reportError (RecognitionException ex) {
        parentMultiLexer.reportError(ex);
    }
   
    /** 
     * Method used to support unit testing of LanguageInfo.isKeyword. We don't want
     * LanguageInfo.isKeyword to require loading of the ANTLR jar, but we also don't want
     * it to get out of date, so this method supports the requisite JUnit test.
     *        
     * @param identifier the identifier to test
     * @return true if the identifier is a CAL keyword such as "data".
     */
    static boolean isKeyword(final String identifier) {
        return keywordsLexer.literals.containsKey(new ANTLRHashString(identifier, keywordsLexer));       
    }
   
    /**
     * Method used to support unit testing of LanguageInfo.isKeyword. We don't want
     * LanguageInfo.isKeyword to require loading of the ANTLR jar, but we also don't want
     * it to get out of date, so this method supports the requisite JUnit test. 
     *  
     * @return number of CAL keywords.
     */
    static int getNKeywords() {
        return keywordsLexer.literals.size();
    }
              
    /*
     *  (non-Javadoc)
     * @see antlr.CharScanner#makeToken(int)
     */
    protected Token makeToken(int t) {
        // Override to set the filename as well.
        Token token = super.makeToken(t);
        token.setFilename(getFilename());
        return token;
    }
   
    /**
     * Copied from antlr.Parser.recover()
     *
     * As of antlr 2.7.6, lexers generated with the default error handler contain calls to this method.
     * However, this method isn't generated by default or implemented by any superclasses,
     * causing a compile error in the generated Java code.
     *
     * TODOEL: Remove this method when feasible. 
     *   Also remove corresponding method from CALDocLexer.
     */
    public void recover(RecognitionException ex,
                         BitSet tokenSet) throws CharStreamException, TokenStreamException {
        consume();
        consumeUntil(tokenSet);
    }

public CALLexer(InputStream in) {
  this(new ByteBuffer(in));
}
public CALLexer(Reader in) {
  this(new CharBuffer(in));
}
public CALLexer(InputBuffer ib) {
  this(new LexerSharedInputState(ib));
}
public CALLexer(LexerSharedInputState state) {
  super(state);
  caseSensitiveLiterals = true;
  setCaseSensitive(true);
  literals = new Hashtable();
  literals.put(new ANTLRHashString("public", this), new Integer(225));
  literals.put(new ANTLRHashString("case", this), new Integer(233));
  literals.put(new ANTLRHashString("dataConstructor", this), new Integer(199));
  literals.put(new ANTLRHashString("where", this), new Integer(220));
  literals.put(new ANTLRHashString("then", this), new Integer(231));
  literals.put(new ANTLRHashString("module", this), new Integer(193));
  literals.put(new ANTLRHashString("using", this), new Integer(196));
  literals.put(new ANTLRHashString("unsafe", this), new Integer(216));
  literals.put(new ANTLRHashString("protected", this), new Integer(227));
  literals.put(new ANTLRHashString("class", this), new Integer(202));
  literals.put(new ANTLRHashString("friend", this), new Integer(201));
  literals.put(new ANTLRHashString("jvm", this), new Integer(217));
  literals.put(new ANTLRHashString("function", this), new Integer(197));
  literals.put(new ANTLRHashString("foreign", this), new Integer(215));
  literals.put(new ANTLRHashString("of", this), new Integer(234));
  literals.put(new ANTLRHashString("if", this), new Integer(230));
  literals.put(new ANTLRHashString("typeConstructor", this), new Integer(198));
  literals.put(new ANTLRHashString("data", this), new Integer(214));
  literals.put(new ANTLRHashString("private", this), new Integer(226));
  literals.put(new ANTLRHashString("default", this), new Integer(221));
  literals.put(new ANTLRHashString("primitive", this), new Integer(224));
  literals.put(new ANTLRHashString("instance", this), new Integer(222));
  literals.put(new ANTLRHashString("deriving", this), new Integer(219));
  literals.put(new ANTLRHashString("typeClass", this), new Integer(200));
  literals.put(new ANTLRHashString("else", this), new Integer(232));
  literals.put(new ANTLRHashString("import", this), new Integer(195));
  literals.put(new ANTLRHashString("in", this), new Integer(229));
  literals.put(new ANTLRHashString("let", this), new Integer(228));
}

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 '(':
        {
          mOPEN_PAREN(true);
          theRetToken=_returnToken;
          break;
        }
        case ')':
        {
          mCLOSE_PAREN(true);
          theRetToken=_returnToken;
          break;
        }
        case '{':
        {
          mOPEN_BRACE(true);
          theRetToken=_returnToken;
          break;
        }
        case '}':
        {
          mCLOSE_BRACE(true);
          theRetToken=_returnToken;
          break;
        }
        case '[':
        {
          mOPEN_BRACKET(true);
          theRetToken=_returnToken;
          break;
        }
        case ']':
        {
          mCLOSE_BRACKET(true);
          theRetToken=_returnToken;
          break;
        }
        case ';':
        {
          mSEMICOLON(true);
          theRetToken=_returnToken;
          break;
        }
        case ',':
        {
          mCOMMA(true);
          theRetToken=_returnToken;
          break;
        }
        case '`':
        {
          mBACKQUOTE(true);
          theRetToken=_returnToken;
          break;
        }
        case '_':
        {
          mUNDERSCORE(true);
          theRetToken=_returnToken;
          break;
        }
        case '*':
        {
          mASTERISK(true);
          theRetToken=_returnToken;
          break;
        }
        case '%':
        {
          mPERCENT(true);
          theRetToken=_returnToken;
          break;
        }
        case '\\':
        {
          mBACKSLASH(true);
          theRetToken=_returnToken;
          break;
        }
        case '&':
        {
          mAMPERSANDAMPERSAND(true);
          theRetToken=_returnToken;
          break;
        }
        case '$':
        {
          mDOLLAR(true);
          theRetToken=_returnToken;
          break;
        }
        case '\'':
        {
          mCHAR_LITERAL(true);
          theRetToken=_returnToken;
          break;
        }
        case '"':
        {
          mSTRING_LITERAL(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':
        {
          mINTEGER_LITERAL(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':
        {
          mCONS_ID(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':
        {
          mVAR_ID(true);
          theRetToken=_returnToken;
          break;
        }
        default:
          if ((LA(1)=='/') && (LA(2)=='*') && (_tokenSet_0.member(LA(3)))) {
            mML_COMMENT(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='/') && (LA(2)=='*') && (LA(3)=='*')) {
            mCALDOC_OPEN(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='/') && (LA(2)=='/')) {
            mSL_COMMENT(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='=') && (LA(2)=='>')) {
            mIMPLIES(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)==':') && (LA(2)==':')) {
            mCOLONCOLON(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='-') && (LA(2)=='>')) {
            mRARROW(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='=') && (LA(2)=='=')) {
            mEQUALSEQUALS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='<') && (LA(2)=='=')) {
            mLESS_THAN_OR_EQUALS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='>') && (LA(2)=='=')) {
            mGREATER_THAN_OR_EQUALS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='!') && (LA(2)=='=')) {
            mNOT_EQUALS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='|') && (LA(2)=='|')) {
            mBARBAR(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='+') && (LA(2)=='+')) {
            mPLUSPLUS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)==':') && (LA(2)=='=')) {
            mCOLONEQUALS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='#') && ((LA(2) >= '1' && LA(2) <= '9'))) {
            mORDINAL_FIELD_NAME(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='>') && (true)) {
            mGREATER_THAN(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='<') && (true)) {
            mLESS_THAN(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)==':') && (true)) {
            mCOLON(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='=') && (true)) {
            mEQUALS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='+') && (true)) {
            mPLUS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='-') && (true)) {
            mMINUS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='/') && (true)) {
            mSOLIDUS(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='!') && (true)) {
            mPLING(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='|') && (true)) {
            mBAR(true);
            theRetToken=_returnToken;
          }
          else if ((LA(1)=='#') && (true)) {
            mPOUND(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) {
        reportError(e);
        consume();
      }
    }
    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;
   
    try {      // for error handling
      {
      int _cnt400=0;
      _loop400:
      do {
        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') && (true) && (true)) {
            match("\r\n");
          }
          else if ((LA(1)=='\r') && (true) && (true) && (true)) {
            match('\r');
          }
          else if ((LA(1)=='\n')) {
            match('\n');
          }
          else {
            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
          }
         
          }
          newline();
          break;
        }
        default:
        {
          if ( _cnt400>=1 ) { break _loop400; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
        }
        }
        _cnt400++;
      } while (true);
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = SL_COMMENT;
    int _saveIndex;
   
    try {      // for error handling
      match("//");
      {
      _loop404:
      do {
        if ((_tokenSet_2.member(LA(1)))) {
          {
          match(_tokenSet_2);
          }
        }
        else {
          break _loop404;
        }
       
      } while (true);
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ML_COMMENT;
    int _saveIndex;
   
    try {      // for error handling
      match("/*");
      {
      if ((_tokenSet_3.member(LA(1)))) {
        {
        match(_tokenSet_3);
        }
      }
      else if ((LA(1)=='\n'||LA(1)=='\r')) {
        {
        {
        if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')) && ((LA(4) >= '\u0000' && LA(4) <= '\ufffe'))) {
          match("\r\n");
        }
        else if ((LA(1)=='\r') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')) && (true)) {
          match('\r');
        }
        else if ((LA(1)=='\n')) {
          match('\n');
        }
        else {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
       
        }
        newline();
        }
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
      {
      _loop412:
      do {
        if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')) && ((LA(4) >= '\u0000' && LA(4) <= '\ufffe'))) {
          match('\r');
          match('\n');
          newline();
        }
        else if (((LA(1)=='*') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')))&&( LA(2)!='/' )) {
          match('*');
        }
        else if ((LA(1)=='\r') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')) && (true)) {
          match('\r');
          newline();
        }
        else if ((LA(1)=='\n')) {
          match('\n');
          newline();
        }
        else if ((_tokenSet_3.member(LA(1)))) {
          {
          match(_tokenSet_3);
          }
        }
        else {
          break _loop412;
        }
       
      } while (true);
      }
      match("*/");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCALDOC_OPEN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = CALDOC_OPEN;
    int _saveIndex;
   
    try {      // for error handling
      if ((LA(1)=='/') && (LA(2)=='*') && (LA(3)=='*') && (LA(4)=='/')) {
        match("/**/");
        _ttype = Token.SKIP;
      }
      else if ((LA(1)=='/') && (LA(2)=='*') && (LA(3)=='*') && (true)) {
        match("/*");
        {
        int _cnt415=0;
        _loop415:
        do {
          if (((LA(1)=='*'))&&( LA(2)!='/' )) {
            match('*');
          }
          else {
            if ( _cnt415>=1 ) { break _loop415; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
          }
         
          _cnt415++;
        } while (true);
        }
        parentMultiLexer.switchToCALDocLexer();
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mOPEN_PAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = OPEN_PAREN;
    int _saveIndex;
   
    try {      // for error handling
      match('(');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCLOSE_PAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = CLOSE_PAREN;
    int _saveIndex;
   
    try {      // for error handling
      match(')');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mOPEN_BRACE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = OPEN_BRACE;
    int _saveIndex;
   
    try {      // for error handling
      match('{');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCLOSE_BRACE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = CLOSE_BRACE;
    int _saveIndex;
   
    try {      // for error handling
      match('}');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mOPEN_BRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = OPEN_BRACKET;
    int _saveIndex;
   
    try {      // for error handling
      match('[');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCLOSE_BRACKET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = CLOSE_BRACKET;
    int _saveIndex;
   
    try {      // for error handling
      match(']');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mSEMICOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = SEMICOLON;
    int _saveIndex;
   
    try {      // for error handling
      match(';');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = COMMA;
    int _saveIndex;
   
    try {      // for error handling
      match(',');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mBACKQUOTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = BACKQUOTE;
    int _saveIndex;
   
    try {      // for error handling
      match('`');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mUNDERSCORE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = UNDERSCORE;
    int _saveIndex;
   
    try {      // for error handling
      match('_');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mIMPLIES(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = IMPLIES;
    int _saveIndex;
   
    try {      // for error handling
      match("=>");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCOLONCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = COLONCOLON;
    int _saveIndex;
   
    try {      // for error handling
      match("::");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mRARROW(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = RARROW;
    int _saveIndex;
   
    try {      // for error handling
      match("->");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mGREATER_THAN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = GREATER_THAN;
    int _saveIndex;
   
    try {      // for error handling
      match('>');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mLESS_THAN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = LESS_THAN;
    int _saveIndex;
   
    try {      // for error handling
      match('<');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = COLON;
    int _saveIndex;
   
    try {      // for error handling
      match(':');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mEQUALS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = EQUALS;
    int _saveIndex;
   
    try {      // for error handling
      match('=');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mEQUALSEQUALS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = EQUALSEQUALS;
    int _saveIndex;
   
    try {      // for error handling
      match("==");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mLESS_THAN_OR_EQUALS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = LESS_THAN_OR_EQUALS;
    int _saveIndex;
   
    try {      // for error handling
      match("<=");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mGREATER_THAN_OR_EQUALS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = GREATER_THAN_OR_EQUALS;
    int _saveIndex;
   
    try {      // for error handling
      match(">=");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mNOT_EQUALS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = NOT_EQUALS;
    int _saveIndex;
   
    try {      // for error handling
      match("!=");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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;
   
    try {      // for error handling
      match('+');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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;
   
    try {      // for error handling
      match('-');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mASTERISK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ASTERISK;
    int _saveIndex;
   
    try {      // for error handling
      match('*');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mSOLIDUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = SOLIDUS;
    int _saveIndex;
   
    try {      // for error handling
      match('/');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mPERCENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = PERCENT;
    int _saveIndex;
   
    try {      // for error handling
      match('%');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mPLING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = PLING;
    int _saveIndex;
   
    try {      // for error handling
      match('!');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mBACKSLASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = BACKSLASH;
    int _saveIndex;
   
    try {      // for error handling
      match('\\');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mBAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = BAR;
    int _saveIndex;
   
    try {      // for error handling
      match('|');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mAMPERSANDAMPERSAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = AMPERSANDAMPERSAND;
    int _saveIndex;
   
    try {      // for error handling
      match("&&");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mBARBAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = BARBAR;
    int _saveIndex;
   
    try {      // for error handling
      match("||");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mPLUSPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = PLUSPLUS;
    int _saveIndex;
   
    try {      // for error handling
      match("++");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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;
   
    try {      // for error handling
      match("$");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mPOUND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = POUND;
    int _saveIndex;
   
    try {      // for error handling
      match("#");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCOLONEQUALS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = COLONEQUALS;
    int _saveIndex;
   
    try {      // for error handling
      match(":=");
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCHAR_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = CHAR_LITERAL;
    int _saveIndex;
   
    try {      // for error handling
      match('\'');
      {
      if ((LA(1)=='\\')) {
        mESC(false);
      }
      else if ((_tokenSet_4.member(LA(1)))) {
        matchNot('\'');
      }
      else {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
     
      }
      match('\'');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ESC;
    int _saveIndex;
   
    try {      // for error handling
      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 'u':
      {
        {
        int _cnt460=0;
        _loop460:
        do {
          if ((LA(1)=='u')) {
            match('u');
          }
          else {
            if ( _cnt460>=1 ) { break _loop460; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
          }
         
          _cnt460++;
        } while (true);
        }
        mHEX_DIGIT(false);
        mHEX_DIGIT(false);
        mHEX_DIGIT(false);
        mHEX_DIGIT(false);
        break;
      }
      case '0'case '1'case '2'case '3':
      {
        {
        matchRange('0','3');
        }
        {
        if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true) && (true)) {
          {
          matchRange('0','7');
          }
          {
          if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true) && (true)) {
            matchRange('0','7');
          }
          else if (((LA(1) >= '\u0000' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
          }
          else {
            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
          }
         
          }
        }
        else if (((LA(1) >= '\u0000' && LA(1) <= '\ufffe')) && (true) && (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) <= '7')) && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && (true) && (true)) {
          {
          matchRange('0','7');
          }
        }
        else if (((LA(1) >= '\u0000' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
        }
        else {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
       
        }
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_5);
    }
    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_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = STRING_LITERAL;
    int _saveIndex;
   
    try {      // for error handling
      match('"');
      {
      _loop456:
      do {
        if ((LA(1)=='\\')) {
          mESC(false);
        }
        else if ((_tokenSet_6.member(LA(1)))) {
          {
          match(_tokenSet_6);
          }
        }
        else {
          break _loop456;
        }
       
      } while (true);
      }
      match('"');
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = HEX_DIGIT;
    int _saveIndex;
   
    try {      // for error handling
      {
      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());
      }
      }
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_5);
    }
    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 mINTEGER_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = INTEGER_LITERAL;
    int _saveIndex;
   
    try {      // for error handling
      switch ( LA(1)) {
      case '.':
      {
        match('.');
        _ttype = DOT;
        {
        if (((LA(1) >= '0' && LA(1) <= '9'))) {
          {
          int _cnt473=0;
          _loop473:
          do {
            if (((LA(1) >= '0' && LA(1) <= '9'))) {
              matchRange('0','9');
            }
            else {
              if ( _cnt473>=1 ) { break _loop473; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
            }
           
            _cnt473++;
          } while (true);
          }
          {
          if ((LA(1)=='E'||LA(1)=='e')) {
            mEXPONENT(false);
          }
          else {
          }
         
          }
          _ttype = FLOAT_LITERAL;
        }
        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');
          break;
        }
        case '1'case '2'case '3'case '4':
        case '5'case '6'case '7'case '8':
        case '9':
        {
          {
          matchRange('1','9');
          }
          {
          _loop478:
          do {
            if (((LA(1) >= '0' && LA(1) <= '9'))) {
              matchRange('0','9');
            }
            else {
              break _loop478;
            }
           
          } while (true);
          }
          break;
        }
        default:
        {
          throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
        }
        }
        }
        {
        if ((LA(1)=='.'||LA(1)=='E'||LA(1)=='e')) {
          {
          switch ( LA(1)) {
          case '.':
          {
            match('.');
            {
            _loop482:
            do {
              if (((LA(1) >= '0' && LA(1) <= '9'))) {
                matchRange('0','9');
              }
              else {
                break _loop482;
              }
             
            } 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 = FLOAT_LITERAL;
        }
        else {
        }
       
        }
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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;
   
    try {      // for error handling
      {
      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;
      }
      case '0'case '1'case '2'case '3':
      case '4'case '5'case '6'case '7':
      case '8'case '9':
      {
        break;
      }
      default:
      {
        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
      }
      }
      }
      {
      int _cnt488=0;
      _loop488:
      do {
        if (((LA(1) >= '0' && LA(1) <= '9'))) {
          matchRange('0','9');
        }
        else {
          if ( _cnt488>=1 ) { break _loop488; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
        }
       
        _cnt488++;
      } while (true);
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 mCONS_ID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = CONS_ID;
    int _saveIndex;
   
    try {      // for error handling
      {
      matchRange('A','Z');
      }
      {
      _loop492:
      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 _loop492;
        }
        }
      } while (true);
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    _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;
  }
 
  public final void mVAR_ID(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = VAR_ID;
    int _saveIndex;
   
    try {      // for error handling
      {
      matchRange('a','z');
      }
      {
      _loop496:
      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 _loop496;
        }
        }
      } while (true);
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    _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;
  }
 
  public final void mORDINAL_FIELD_NAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ORDINAL_FIELD_NAME;
    int _saveIndex;
   
    try {      // for error handling
      {
      match('#');
      }
      {
      matchRange('1','9');
      }
      {
      _loop501:
      do {
        if (((LA(1) >= '0' && LA(1) <= '9'))) {
          matchRange('0','9');
        }
        else {
          break _loop501;
        }
       
      } while (true);
      }
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_1);
    }
    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 = new long[2048];
    data[0]=-4398046511105L;
    for (int i = 1; i<=1022; i++) { data[i]=-1L; }
    data[1023]=9223372036854775807L;
    return data;
  }
  public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
  private static final long[] mk_tokenSet_1() {
    long[] data = new long[1025];
    return data;
  }
  public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
  private static final long[] mk_tokenSet_2() {
    long[] data = new long[2048];
    data[0]=-9217L;
    for (int i = 1; i<=1022; i++) { data[i]=-1L; }
    data[1023]=9223372036854775807L;
    return data;
  }
  public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
  private static final long[] mk_tokenSet_3() {
    long[] data = new long[2048];
    data[0]=-4398046520321L;
    for (int i = 1; i<=1022; i++) { data[i]=-1L; }
    data[1023]=9223372036854775807L;
    return data;
  }
  public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
  private static final long[] mk_tokenSet_4() {
    long[] data = new long[2048];
    data[0]=-549755813889L;
    data[1]=-268435457L;
    for (int i = 2; i<=1022; i++) { data[i]=-1L; }
    data[1023]=9223372036854775807L;
    return data;
  }
  public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
  private static final long[] mk_tokenSet_5() {
    long[] data = new long[2048];
    for (int i = 0; i<=1022; i++) { data[i]=-1L; }
    data[1023]=9223372036854775807L;
    return data;
  }
  public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
  private static final long[] mk_tokenSet_6() {
    long[] data = new long[2048];
    data[0]=-17179869185L;
    data[1]=-268435457L;
    for (int i = 2; i<=1022; i++) { data[i]=-1L; }
    data[1023]=9223372036854775807L;
    return data;
  }
  public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
 
  }
TOP

Related Classes of org.openquark.cal.compiler.CALLexer

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.