/** * Overrides next token to match includes and to * recover from EOF */ @Override public Token nextToken(){ Token token = tr.nextToken(); //count non-empty tokens for eventual checking of the style sheet start if (token.getType() == S) { tokencnt++; } // Skip first token after switching on another input. if(((CommonToken)token).getStartIndex() < 0) token = nextToken(); return token; }