org.antlr.runtime.Token.getChannel()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中org.antlr.runtime.Token.getChannel()方法的一些代码示例,展示了Token.getChannel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Token.getChannel()方法的具体详情如下:
包路径:org.antlr.runtime.Token
类名称:Token
方法名:getChannel

Token.getChannel介绍

暂无

代码示例

代码示例来源:origin: JesusFreke/smali

if (t.getChannel()>0) {
 channelStr=",channel="+t.getChannel();

代码示例来源:origin: iBotPeaches/Apktool

if (token.getChannel() == smaliParser.HIDDEN) {
  continue;

代码示例来源:origin: pmd/pmd

if (token.getChannel() != Lexer.HIDDEN) {
  String tokenText = token.getText();
  if (!caseSensitive) {

代码示例来源:origin: JesusFreke/smali

if (token.getChannel() == smaliParser.HIDDEN) {
  continue;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr-runtime

protected int skipOffTokenChannelsReverse(int i) {
  while ( i>=0 && tokens.get(i).getChannel()!=channel ) {
    i--;
  }
  return i;
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

protected int skipOffTokenChannelsReverse(int i) {
  while ( i>=0 && tokens.get(i).getChannel()!=channel ) {
    i--;
  }
  return i;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

protected int skipOffTokenChannelsReverse(int i) {
  while ( i>=0 && ((Token)tokens.get(i)).getChannel()!=channel ) {
    i--;
  }
  return i;
}

代码示例来源:origin: antlr/antlr3

protected int skipOffTokenChannelsReverse(int i) {
  while ( i>=0 && tokens.get(i).getChannel()!=channel ) {
    i--;
  }
  return i;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

protected int skipOffTokenChannelsReverse(int i) {
  while ( i>=0 && ((Token)tokens.get(i)).getChannel()!=channel ) {
    i--;
  }
  return i;
}

代码示例来源:origin: antlr/antlr3

/** Given a starting index, return the index of the first on-channel
 *  token.
 */
protected int skipOffTokenChannels(int i) {
  int n = tokens.size();
  while ( i<n && tokens.get(i).getChannel()!=channel ) {
    i++;
  }
  return i;
}

代码示例来源:origin: antlr/antlr3

/** Given a starting index, return the index of the first on-channel
 *  token.
 */
protected int skipOffTokenChannels(int i) {
  int n = tokens.size();
  while ( i<n && tokens.get(i).getChannel()!=channel ) {
    i++;
  }
  return i;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/** Given a starting index, return the index of the first on-channel
 *  token.
 */
protected int skipOffTokenChannels(int i) {
  int n = tokens.size();
  while ( i<n && ((Token)tokens.get(i)).getChannel()!=channel ) {
    i++;
  }
  return i;
}

代码示例来源:origin: antlr/antlr3

/** Count EOF just once. */
public int getNumberOfOnChannelTokens() {
  int n = 0;
  fill();
  for (int i = 0; i < tokens.size(); i++) {
    Token t = tokens.get(i);
    if ( t.getChannel()==channel ) n++;
    if ( t.getType()==Token.EOF ) break;
  }
  return n;
}

代码示例来源:origin: antlr/antlr3

@Override
protected void setup() {
  p = 0;
  sync(0);
  int i = 0;
  while ( tokens.get(i).getChannel()!=channel ) {
    i++;
    sync(i);
  }
  p = i;
}

代码示例来源:origin: antlr/antlr3

/** Given a starting index, return the index of the first on-channel
 *  token.
 */
protected int skipOffTokenChannels(int i) {
  sync(i);
  while ( tokens.get(i).getChannel()!=channel ) { // also stops at EOF (it's onchannel)
    i++;
    sync(i);
  }
  return i;
}

代码示例来源:origin: antlr/antlr3

protected String serializeToken(Token t) {
  StringBuffer buf = new StringBuffer(50);
  buf.append(t.getTokenIndex()); buf.append('\t');
  buf.append(t.getType()); buf.append('\t');
  buf.append(t.getChannel()); buf.append('\t');
  buf.append(t.getLine()); buf.append('\t');
  buf.append(t.getCharPositionInLine());
  serializeText(buf, t.getText());
  return buf.toString();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/** Always leave p on an on-channel token. */
public void consume() {
  if ( p == -1 ) setup();
  p++;
  sync(p);
  while ( tokens.get(p).getChannel()!=channel ) {
    p++;
    sync(p);
  }
}

代码示例来源:origin: antlr/antlr3

public ClassicToken(Token oldToken) {
  text = oldToken.getText();
  type = oldToken.getType();
  line = oldToken.getLine();
  charPositionInLine = oldToken.getCharPositionInLine();
  channel = oldToken.getChannel();
}

代码示例来源:origin: antlr/antlr3

public ClassicToken(Token oldToken) {
  text = oldToken.getText();
  type = oldToken.getType();
  line = oldToken.getLine();
  charPositionInLine = oldToken.getCharPositionInLine();
  channel = oldToken.getChannel();
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

public ClassicToken(Token oldToken) {
  text = oldToken.getText();
  type = oldToken.getType();
  line = oldToken.getLine();
  charPositionInLine = oldToken.getCharPositionInLine();
  channel = oldToken.getChannel();
}

相关文章