seq ::= ( atom [ '...' ] )* ;
(tokens, options)
| 390 | |
| 391 | |
| 392 | def parse_seq(tokens, options): |
| 393 | """seq ::= ( atom [ '...' ] )* ;""" |
| 394 | result = [] |
| 395 | while tokens.current() not in [None, ']', ')', '|']: |
| 396 | atom = parse_atom(tokens, options) |
| 397 | if tokens.current() == '...': |
| 398 | atom = [OneOrMore(*atom)] |
| 399 | tokens.move() |
| 400 | result += atom |
| 401 | return result |
| 402 | |
| 403 | |
| 404 | def parse_atom(tokens, options): |
no test coverage detected
searching dependent graphs…