<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def expand_syntax(string):
 """Iterator over all the strings in the expansion of the argument"""

    match = syntax_pattern.search(string)
    if match:
        prefix = string[:match.start()]
        suffix = string[match.end():]
        intervals = match.group(1).split(',')
        for interval in intervals:
            interval_match = interval_pattern.match(interval)
            if interval_match:
                start = interval_match.group(1)
                end = (interval_match.group(2) or start).strip('-')
                for i in _iter_numbers(start, end):
                    for expanded in expand_syntax(prefix + i + suffix):
                        yield expanded
    else:
        yield string