def METHOD_NAME(self):
    contents = []
    while not self.isEOF() and self.source[self.index] != '|':
        contents.append(self.parseTerm())
    return {'type': 'Alternative', 'contents': contents}