Tabnine Logo
CommonTokenStream.sync
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.antlr/antlr4-runtime

  @Override
  public Token LT(int k) {
    //System.out.println("enter LT("+k+")");
    lazyInit();
    if ( k == 0 ) return null;
    if ( k < 0 ) return LB(-k);
    int i = p;
    int n = 1; // we know tokens[p] is a good one
    // find k good tokens
    while ( n<k ) {
      // skip off-channel tokens, but make sure to not look past EOF
      if (sync(i + 1)) {
        i = nextTokenOnChannel(i + 1, channel);
      }
      n++;
    }
//        if ( i>range ) range = i;
    return tokens.get(i);
  }

origin: com.tunnelvisionlabs/antlr4-runtime

  @Override
  public Token LT(int k) {
    //System.out.println("enter LT("+k+")");
    lazyInit();
    if ( k == 0 ) return null;
    if ( k < 0 ) return LB(-k);
    int i = p;
    int n = 1; // we know tokens[p] is a good one
    // find k good tokens
    while ( n<k ) {
      // skip off-channel tokens, but make sure to not look past EOF
      if (sync(i + 1)) {
        i = nextTokenOnChannel(i + 1, channel);
      }
      n++;
    }
//        if ( i>range ) range = i;
    return tokens.get(i);
  }
 
origin: uk.co.nichesolutions/antlr4-runtime

  @Override
  public Token LT(int k) {
    //System.out.println("enter LT("+k+")");
    lazyInit();
    if ( k == 0 ) return null;
    if ( k < 0 ) return LB(-k);
    int i = p;
    int n = 1; // we know tokens[p] is a good one
    // find k good tokens
    while ( n<k ) {
      // skip off-channel tokens, but make sure to not look past EOF
      if (sync(i + 1)) {
        i = nextTokenOnChannel(i + 1, channel);
      }
      n++;
    }
//        if ( i>range ) range = i;
    return tokens.get(i);
  }

origin: com.impetus.fabric/fabric-jdbc-driver-shaded

  @Override
  public Token LT(int k) {
    //System.out.println("enter LT("+k+")");
    lazyInit();
    if ( k == 0 ) return null;
    if ( k < 0 ) return LB(-k);
    int i = p;
    int n = 1; // we know tokens[p] is a good one
    // find k good tokens
    while ( n<k ) {
      // skip off-channel tokens, but make sure to not look past EOF
      if (sync(i + 1)) {
        i = nextTokenOnChannel(i + 1, channel);
      }
      n++;
    }
//        if ( i>range ) range = i;
    return tokens.get(i);
  }

origin: io.virtdata/virtdata-lib-realer

  @Override
  public Token LT(int k) {
    //System.out.println("enter LT("+k+")");
    lazyInit();
    if ( k == 0 ) return null;
    if ( k < 0 ) return LB(-k);
    int i = p;
    int n = 1; // we know tokens[p] is a good one
    // find k good tokens
    while ( n<k ) {
      // skip off-channel tokens, but make sure to not look past EOF
      if (sync(i + 1)) {
        i = nextTokenOnChannel(i + 1, channel);
      }
      n++;
    }
//        if ( i>range ) range = i;
    return tokens.get(i);
  }

org.antlr.v4.runtimeCommonTokenStreamsync

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,
  • previousTokenOnChannel,
  • LT,
  • consume,
  • index

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • getSystemService (Context)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Path (java.nio.file)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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