MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / parse_seq

Function parse_seq

preprocessor/docopt.py:390–399  ·  view source on GitHub ↗

seq ::= ( atom [ '...' ] )* ;

(tokens, options)

Source from the content-addressed store, hash-verified

388
389
390def parse_seq(tokens, options):
391 """seq ::= ( atom [ '...' ] )* ;"""
392 result = []
393 while tokens.current() not in [None, ']', ')', '|']:
394 atom = parse_atom(tokens, options)
395 if tokens.current() == '...':
396 atom = [OneOrMore(*atom)]
397 tokens.move()
398 result += atom
399 return result
400
401
402def parse_atom(tokens, options):

Callers 1

parse_exprFunction · 0.85

Calls 4

parse_atomFunction · 0.85
OneOrMoreClass · 0.85
currentMethod · 0.80
moveMethod · 0.80

Tested by

no test coverage detected