From 7dcb148d732613640574fc645782104954c33537 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Thu, 23 Feb 2012 11:21:22 -0600 Subject: [PATCH] CommonTokenStream now extends BufferedTokenStream instead of BufferedTokenStream. Token interface provides the same information and the change helps the work on improving generics. --- .../Java/src/org/antlr/v4/runtime/CommonTokenStream.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/Java/src/org/antlr/v4/runtime/CommonTokenStream.java b/runtime/Java/src/org/antlr/v4/runtime/CommonTokenStream.java index 808fd0138..2b9f38bac 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/CommonTokenStream.java +++ b/runtime/Java/src/org/antlr/v4/runtime/CommonTokenStream.java @@ -46,7 +46,7 @@ package org.antlr.v4.runtime; * @see UnbufferedTokenStream * @see BufferedTokenStream */ -public class CommonTokenStream extends BufferedTokenStream { +public class CommonTokenStream extends BufferedTokenStream { /** Skip tokens on any channel but this one; this is how we skip whitespace... */ protected int channel = Token.DEFAULT_CHANNEL; @@ -67,7 +67,7 @@ public class CommonTokenStream extends BufferedTokenStream { if ( p == -1 ) setup(); p++; sync(p); - CommonToken t = tokens.get(p); + Token t = tokens.get(p); while ( t.getType()!=Token.EOF && t.getChannel()!=channel ) { p++; sync(p); @@ -90,7 +90,7 @@ public class CommonTokenStream extends BufferedTokenStream { } @Override - protected CommonToken LB(int k) { + protected Token LB(int k) { if ( k==0 || (p-k)<0 ) return null; int i = p; @@ -106,7 +106,7 @@ public class CommonTokenStream extends BufferedTokenStream { } @Override - public CommonToken LT(int k) { + public Token LT(int k) { //System.out.println("enter LT("+k+")"); if ( p == -1 ) setup(); if ( k == 0 ) return null;