def SplitNewStyleEmpty(newstyle):
  """Splits according to one of the forms of path elements this code uses.

  See tests/test-path_utils.py for semantics.

  Args:
      newstyle: 'newstyle' path.
  Returns:
      List of tokens from path argument.
  """
  tokens = newstyle.split(".")
  newstyle_tokens = []
  while tokens:
    token = tokens.pop(-1)
    if token == "[]":
      token = tokens.pop(-1) + ".[]"
    newstyle_tokens.insert(0, token)
  return newstyle_tokens