```python
import re


def parse_option(segment: str) -> list:
    key, eq, raw = segment.partition("=")
    if not eq or re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*", key) is None:
        raise ValueError("malformed option segment: " + segment)
    if len(raw) >= 2 and raw.startswith('"') and raw.endswith('"'):
        raw = raw[1:-1]
    return [key, raw]


def scan_pairs(text: str) -> list:
    if not isinstance(text, str):
        raise ValueError("input must be a string")
    if text == "":
        return []
    pairs = []
    for segment in text.split(";"):
        segment = segment.strip()
        if segment == "":
            continue
        if segment.startswith('"') and segment.endswith('"'):
            if segment[1:-1].strip() == "":
                continue
            pair = parse_option(segment[1:-1])
            pairs.append(pair)
        else:
            if "=" not in segment:
                raise ValueError("option segment must have an equals sign")
            pair = parse_option(segment)
            pairs.append(pair)
    return pairs
```