public List<? extends Token> getAllTokens() {List<Token> tokens = new ArrayList<Token>();Token t = nextToken();while ( t.getType()!=Token.EOF ) {tokens.add(t);t = nextToken();}return tokens;}

public virtual IList<IToken> GetAllTokens(){IList<IToken> tokens = new List<IToken>();IToken t = NextToken();while (t.Type != TokenConstants.EOF){tokens.Add(t);t = NextToken();}return tokens;}
