void split() {
        Lexem l;
        while ((l = scanner.next()) != Lexem.EOF) {
            switch (l) {
                case SEPARATOR:
                    flushStringBuilder();
                    break;
                case COMMENT:
                    //skip
                    break;
                case WHITESPACE:
                    if (!sb.toString().endsWith(" ")) {
                        sb.append(' ');
                    }
                    break;
                case IDENTIFIER:
                    appendMatch();
                    if ("begin".equalsIgnoreCase(scanner.getCurrentMatch())) {
                        compoundStatement(false);
                        flushStringBuilder();
                    }
                    break;
                default:
                    appendMatch();
            }
        }
        flushStringBuilder();
    }
Standard parsing:
1. Remove comments
2. Shrink whitespace and eols
3. Split on separator
modules/database-commons/src/main/java/org/testcontainers/ext/ScriptSplitter.java