Package org.jostraca.comp.antlr

Examples of org.jostraca.comp.antlr.Token


    }
    _returnToken = _token;
  }
 
  public final void mARGNAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = ARGNAME;
    int _saveIndex;
   
    boolean synPredMatched20 = false;
    if (((_tokenSet_4.member(LA(1))) && (_tokenSet_5.member(LA(2))))) {
      int _m20 = mark();
      synPredMatched20 = true;
      inputState.guessing++;
      try {
        {
        mID(false);
        match('=');
        }
      }
      catch (RecognitionException pe) {
        synPredMatched20 = false;
      }
      rewind(_m20);
      inputState.guessing--;
    }
    if ( synPredMatched20 ) {
      mID(false);
      _saveIndex=text.length();
      match('=');
      text.setLength(_saveIndex);
      if ( inputState.guessing==0 ) {
        /* System.out.println( "anan: "+$getText ); */
      }
    }
    else if ((_tokenSet_0.member(LA(1))) && (true)) {
      mNONSPACE(false);
      if ( inputState.guessing==0 ) {
        _ttype = DirectiveAntlrLexerTokenTypes.NONSPACE; /* System.out.println( "anns: "+$getText ); */
      }
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here


  setCaseSensitive(false);
  literals = new Hashtable();
}

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

    }
  }
}

  public final void mTRUE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = TRUE;
    int _saveIndex;
   
    switch ( LA(1)) {
    case 't':
    {
      match('t');
      {
      if ((LA(1)=='r')) {
        match('r');
        match('u');
        match('e');
      }
      else {
      }
     
      }
      break;
    }
    case 'y':
    {
      match('y');
      {
      if ((LA(1)=='e')) {
        match('e');
        match('s');
      }
      else {
      }
     
      }
      break;
    }
    case '1':
    {
      match('1');
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mFALSE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = FALSE;
    int _saveIndex;
   
    switch ( LA(1)) {
    case 'f':
    {
      match('f');
      {
      if ((LA(1)=='a')) {
        match('a');
        match('l');
        match('s');
        match('e');
      }
      else {
      }
     
      }
      break;
    }
    case 'n':
    {
      match('n');
      {
      if ((LA(1)=='o')) {
        match('o');
      }
      else {
      }
     
      }
      break;
    }
    case '0':
    {
      match('0');
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = AND;
    int _saveIndex;
   
    switch ( LA(1)) {
    case ',':
    {
      match(',');
      break;
    }
    case '+':
    {
      match('+');
      break;
    }
    case 'a':
    {
      match('a');
      match('n');
      match('d');
      break;
    }
    default:
      if ((LA(1)=='&') && (LA(2)=='&')) {
        match('&');
        match('&');
      }
      else if ((LA(1)=='&') && (true)) {
        match('&');
      }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = OR;
    int _saveIndex;
   
    if ((LA(1)=='|') && (LA(2)=='|')) {
      match('|');
      match('|');
    }
    else if ((LA(1)=='|') && (true)) {
      match('|');
    }
    else if ((LA(1)=='o')) {
      match('o');
      match('r');
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = XOR;
    int _saveIndex;
   
    if ((LA(1)=='^') && (LA(2)=='^')) {
      match('^');
      match('^');
    }
    else if ((LA(1)=='^') && (true)) {
      match('^');
    }
    else if ((LA(1)=='x')) {
      match('x');
      match('o');
      match('r');
    }
    else {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
   
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = NOT;
    int _saveIndex;
   
    switch ( LA(1)) {
    case '!':
    {
      match('!');
      break;
    }
    case '~':
    {
      match('~');
      break;
    }
    case 'n':
    {
      match('n');
      match('o');
      match('t');
      break;
    }
    default:
    {
      throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
    }
    }
    if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
      _token = makeToken(_ttype);
      _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
    }
    _returnToken = _token;
  }
View Full Code Here

    }
    _returnToken = _token;
  }
 
  public final void mLP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = LP;
    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 mRP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
    int _ttype; Token _token=null; int _begin=text.length();
    _ttype = RP;
    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 org.jostraca.comp.antlr.Token

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