(table_string: str)
| 126 | |
| 127 | |
| 128 | def parse_tables(table_string: str): |
| 129 | lines = table_string.strip().split("\n") |
| 130 | tables = list() |
| 131 | while True: |
| 132 | p = parse_table(lines) |
| 133 | if type(p) is tuple: |
| 134 | table, lines = p |
| 135 | tables.append(table) |
| 136 | else: |
| 137 | if p is not None: |
| 138 | tables.append(p) |
| 139 | break |
| 140 | if len(tables) == 1: |
| 141 | return tables[0] |
| 142 | else: |
| 143 | return tables |