# parse_synapse_generator function

(Shortest import: `from brian2.synapses.parse_synaptic_generator_syntax import parse_synapse_generator)`

brian2.synapses.parse_synaptic_generator_syntax.parse_synapse_generator(expr)

  Returns a parsed form of a synapse generator expression.

  The general form is:

  `element for inner_variable in iterator_func(...)`

  or

  `element for inner_variable in iterator_func(...) if if_expression`

  Returns a dictionary with keys:

  `original_expression`

    The original expression as a string.

  `element`

    As above, a string expression.

  `inner_variable`

    A variable name, as above.

  `iterator_func`

    String. Either `range` or `sample`.

  `if_expression`

    String expression or `None`.

  `iterator_kwds`

    Dictionary of key/value pairs representing the keywords. See `handle_range` and `handle_sample`.