public Token scan() {
        Token tok;
        SourcePosition pos;
        int kind;

        boolean isDiv;

        currentlyScanningToken = false;
        while(currentChar == '/'
                || currentChar == ' '
                || currentChar == '\n'
                || currentChar == '\r'
                || currentChar == '\t') {
            isDiv = scanSeparator();
            if(isDiv) {
                pos = new SourcePosition();
                pos.start = divStart;
                pos.finish = divFinish;
                tok = new Token(Token.DIV, "/", pos);
                
                return tok;
            }
        } 

        currentlyScanningToken = true;
        currentSpelling = new StringBuffer("");
        pos = new SourcePosition();
        pos.start = sourceFile.getCurrentLine();

        kind = scanToken();

        pos.finish = sourceFile.getCurrentLine();
        tok = new Token(kind, currentSpelling.toString(), pos);

        return tok;
    }