pyebnf/primitive.py
def _get_terminal(value, text):
  """Checks the beginning of text for a value. If it is found, a terminal ParseNode is returned
  filled out appropriately for the value it found. DeadEnd is raised if the value does not match.
  """
  if text and text.startswith(value):
    return ParseNode(ParseNodeType.terminal,
                      children=[value],
                      consumed=len(value),
                      position=-len(text))
  else:
    raise DeadEnd()
def _get_terminal(value, text):
  if text and text.startswith(value):
    return ParseNode(ParseNodeType.terminal,
                      children=[value],
                      consumed=len(value),
                      position=-len(text))
  else:
    raise DeadEnd()
def _get_terminal ( value , text ) : if text and text . startswith ( value ) : return ParseNode ( ParseNodeType . terminal , children = [ value ] , consumed = len ( value ) , position = - len ( text ) ) else : raise DeadEnd ( )
Checks the beginning of text for a value. If it is found, a terminal ParseNode is returned
  filled out appropriately for the value it found. DeadEnd is raised if the value does not match.
Checks the beginning of text for a value . If it is found a terminal ParseNode is returned filled out appropriately for the value it found . DeadEnd is raised if the value does not match .