def _parse_expr(self):
<EOL>sentence_list = []<EOL>cur_sentence = []<EOL>sentence_list.append(Sentence(cur_sentence))<EOL>while self._current_position < len(self.tokens):<EOL><INDENT>cur = self.tokens[self._current_position]<EOL>self._current_position += <NUM_LIT:1><EOL>if cur == '<STR_LIT:(>':<EOL><INDENT>subexpr = self._parse_expr()<EOL>normal_brackets = False<EOL>if len(subexpr.tree()) == <NUM_LIT:1>:<EOL><INDENT>normal_brackets = True<EOL>cur_sentence.append(Word('<STR_LIT:(>'))<EOL><DEDENT>cur_sentence.append(subexpr)<EOL>if normal_brackets:<EOL><INDENT>cur_sentence.append(Word('<STR_LIT:)>'))<EOL><DEDENT><DEDENT>elif cur == '<STR_LIT:|>':<EOL><INDENT>cur_sentence = []<EOL>sentence_list.append(Sentence(cur_sentence))<EOL><DEDENT>elif cur == '<STR_LIT:)>':<EOL><INDENT>break<EOL><DEDENT>else:<EOL><INDENT>cur_sentence.append(Word(cur))<EOL><DEDENT><DEDENT>return Options(sentence_list)<EOL>
Generate sentence token trees from the current position to
the next closing parentheses / end of the list and return it
['1', '(', '2', '|', '3, ')'] -> ['1', [['2'], ['3']]]
['2', '|', '3'] -> [['2'], ['3']]