docs: function dfs(states, tokens) {
    let root = states[0].reduce((best, curr) => {
      if (best == null || curr.origin > best.origin) {
        return curr;
      }
      return best;
    }, null);
  
    if (root == null) {
      throw new SyntaxError(`Parsing error near '${tokens[0]}' `);
    }
    if (root.origin !== tokens.length) {
      throw new SyntaxError(`Parsing error near '${tokens[root.origin]}' `);
    }
  
    return {
      item    : root.rule,
      children: dfsHelper(states, root, 0, 0, tokens)
    };
  }