Package antlr

Examples of antlr.Token


  }
 
  public final int  idx() throws RecognitionException, TokenStreamException {
    int i = -1;
   
    Token  idx = null;
   
    try {      // for error handling
      idx = LT(1);
      match(INT);
      i = Integer.parseInt(idx.getText());
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_7);
    }
View Full Code Here


  }
 
  public final String  mondrName() throws RecognitionException, TokenStreamException {
    String name = null;
   
    Token  n = null;
   
    try {      // for error handling
      n = LT(1);
      match(MONDRNAME);
      name = getMondrName(n.getText());
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_8);
    }
View Full Code Here

  }
 
  public final String  name() throws RecognitionException, TokenStreamException {
    String name = null;
   
    Token  n = null;
   
    try {      // for error handling
      n = LT(1);
      match(NAME);
      name = n.getText();
    }
    catch (RecognitionException ex) {
      reportError(ex);
      recover(ex,_tokenSet_9);
    }
View Full Code Here

  literals.put(new ANTLRHashString("not", this), new Integer(6));
  literals.put(new ANTLRHashString("contains", this), new Integer(7));
}

public Token nextToken() throws TokenStreamException {
  Token theRetToken=null;
tryAgain:
  for (;;) {
    Token _token = null;
    int _ttype = Token.INVALID_TYPE;
    resetText();
    try {   // for char stream error handling
      try {   // for lexical error handling
        switch ( LA(1)) {
View Full Code Here

    }
  }
}

  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;
    }
    default:
    {
      throw new NoViableAltForCharException(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;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = LPAREN;
    int _saveIndex;
   
    match('(');
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = RPAREN;
    int _saveIndex;
   
    match(')');
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = EQUAL;
    int _saveIndex;
   
    match("=");
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mEEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = EEQUAL;
    int _saveIndex;
   
    match("==");
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mNEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = NEQUAL;
    int _saveIndex;
   
    match("!=");
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

TOP

Related Classes of antlr.Token

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.