@staticmethod
def get_expressions(text):
    """Yield valid expressions from text."""
    for line in text.splitlines():
        line_text = line.strip()
        if not line_text or line_text.startswith('#'):
            continue
        expr_text = line_text.split('#', 1)[0].strip()
        yield expr_text
