private static boolean clearBuilder(StringBuilder builder, List<Token> tokens,
                                        File sourceDir, String sourceFile, int lineNumber)
        throws TokenizeError {
        if(builder.length() > 0) {
            tokens.add(createToken(builder.toString(), sourceDir, sourceFile, lineNumber));
            return true;
        } else {
            return false;
        }
    }