(source, options)
| 368 | |
| 369 | |
| 370 | def parse_pattern(source, options): |
| 371 | tokens = TokenStream(re.sub(r'([\[\]\(\)\|]|\.\.\.)', r' \1 ', source), |
| 372 | DocoptLanguageError) |
| 373 | result = parse_expr(tokens, options) |
| 374 | if tokens.current() is not None: |
| 375 | raise tokens.error('unexpected ending: %r' % ' '.join(tokens)) |
| 376 | return Required(*result) |
| 377 | |
| 378 | |
| 379 | def parse_expr(tokens, options): |
searching dependent graphs…