congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CommonTokenStream.previousTokenOnChannel
Code IndexAdd Tabnine to your IDE (free)

How to use
previousTokenOnChannel
method
in
org.antlr.v4.runtime.CommonTokenStream

Best Java code snippets using org.antlr.v4.runtime.CommonTokenStream.previousTokenOnChannel (Showing top 5 results out of 315)

origin: org.antlr/antlr4-runtime

@Override
protected Token LB(int k) {
  if ( k==0 || (p-k)<0 ) return null;
  int i = p;
  int n = 1;
  // find k good tokens looking backwards
  while ( n<=k && i>0 ) {
    // skip off-channel tokens
    i = previousTokenOnChannel(i - 1, channel);
    n++;
  }
  if ( i<0 ) return null;
  return tokens.get(i);
}
origin: com.impetus.fabric/fabric-jdbc-driver-shaded

@Override
protected Token LB(int k) {
  if ( k==0 || (p-k)<0 ) return null;
  int i = p;
  int n = 1;
  // find k good tokens looking backwards
  while ( n<=k ) {
    // skip off-channel tokens
    i = previousTokenOnChannel(i - 1, channel);
    n++;
  }
  if ( i<0 ) return null;
  return tokens.get(i);
}
origin: uk.co.nichesolutions/antlr4-runtime

@Override
protected Token LB(int k) {
  if ( k==0 || (p-k)<0 ) return null;
  int i = p;
  int n = 1;
  // find k good tokens looking backwards
  while ( n<=k ) {
    // skip off-channel tokens
    i = previousTokenOnChannel(i - 1, channel);
    n++;
  }
  if ( i<0 ) return null;
  return tokens.get(i);
}
origin: io.virtdata/virtdata-lib-realer

@Override
protected Token LB(int k) {
  if ( k==0 || (p-k)<0 ) return null;
  int i = p;
  int n = 1;
  // find k good tokens looking backwards
  while ( n<=k && i>0 ) {
    // skip off-channel tokens
    i = previousTokenOnChannel(i - 1, channel);
    n++;
  }
  if ( i<0 ) return null;
  return tokens.get(i);
}
origin: com.tunnelvisionlabs/antlr4-runtime

@Override
protected Token LB(int k) {
  if ( k==0 || (p-k)<0 ) return null;
  int i = p;
  int n = 1;
  // find k good tokens looking backwards
  while ( n<=k && i>0 ) {
    // skip off-channel tokens
    i = previousTokenOnChannel(i - 1, channel);
    n++;
  }
  if ( i<0 ) return null;
  return tokens.get(i);
}
org.antlr.v4.runtimeCommonTokenStreampreviousTokenOnChannel

Popular methods of CommonTokenStream

  • <init>
    Constructs a new CommonTokenStream using the specified token source and filtering tokens to the spec
  • getTokens
  • fill
  • get
  • getHiddenTokensToLeft
  • size
  • LA
  • getHiddenTokensToRight
  • reset
  • seek
  • LB
  • getText
  • LB,
  • getText,
  • getTokenSource,
  • lazyInit,
  • nextTokenOnChannel,
  • sync,
  • LT,
  • consume,
  • index

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JOptionPane (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now