Examples of discardOffChannelTokens()


Examples of org.antlr.runtime.CommonTokenStream.discardOffChannelTokens()

      if ( lexer==null ) {
        lexer = new JavaLexer();
      }
      lexer.setCharStream(new ANTLRFileStream(f));
      CommonTokenStream tokens = new CommonTokenStream();
      tokens.discardOffChannelTokens(true);
      tokens.setTokenSource(lexer);
      long start = System.currentTimeMillis();
      tokens.LT(1); // force load
      long stop = System.currentTimeMillis();
      lexerTime += stop-start;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.