keys-in = file-name @fp ->
  - sc lines 1st-line 1st-level fp
  ' 1st-line = 1,
    1st-level = 0
  ' lines : array <- text # "\n"
  ' text = char-in file-name
_
  file-name : string
;

sc keys-in -rc = lines start-with level @fp + i ->
  i = start-with - 1

  while (i <= lines._) ->
    i ++; str <- lines.i

    if (!str | str 1 1 = ';') ->
      <>
    else
      short <- x
      ' x <- s '}' ''
      ' s <- str '{' ''

      if short ->
        if short '=' ->
          - fp key value PRF_KEY level
          ' key <- pair.1,
            value <- pair.2
          ' pair : array <- short # '='
        else
          if (str 1 1 STR_RIGHT = '{') ->
            - fp short '' PRF_GROUP level
          else
            - fp short '' PRF_ERROR level
          ;
        ;
      else
        if (str = '}') ->
          - fp '}' '' PRF_BR level
        else
          <>
        ;
      ;
    ;

    if (str 1 1 STR_RIGHT = '{') ->
      i = sc lines next-line next-level fp
      ' next-line = i + 1,
        next-level = level + 1
    ;

    if (str = '}') -> leave
    else iterate
  ;
_
  lines : array : string
  start-with, level : integer
;