private boolean matchesSingleLineComment() {
        /* Matches from commentPrefix to the EOL or end of script */
        if (matches(commentPrefix)) {
            Matcher m = eol.matcher(script);
            if (m.find(offset)) {
                currentMatch = commentPrefix + script.substring(offset, m.end());
                offset = m.end();
            } else {
                currentMatch = commentPrefix + script.substring(offset);
                offset = script.length();
            }
            return true;
        }
        return false;
    }
Rough lexical parser for SQL scripts.
modules/database-commons/src/main/java/org/testcontainers/ext/ScriptScanner.java