def separator(self, separator="<STR_LIT:U+002C>", end_token=None):
while True:<EOL><INDENT>token = self.next()<EOL>t_value = token["<STR_LIT:value>"]<EOL>if end_token and t_value == end_token:<EOL><INDENT>raise self.ParseEnd()<EOL><DEDENT>if t_value == separator:<EOL><INDENT>return<EOL><DEDENT>if t_value == "<STR_LIT:\n>":<EOL><INDENT>continue<EOL><DEDENT>self.error("<STR_LIT>")<EOL><DEDENT>
Read through tokens till the required separator is found.  We ignore
newlines.  If an end token is supplied raise a ParseEnd exception if it
is found.