public function parse($nodes, $filename = NULL) {
    $this->nodes = $nodes;
    $this->filename = $filename;
    $this->position = 0;
    $this->length = count($nodes);
    $this->operators = [$this->sentinel];
    $this->operands = [];
    $this->E();
    if ($this->next()) {
      $next = $this->next();
      throw new ParserException(
        $this->filename,
        $next->getLineNumber(),
        $next->getColumnNumber(),
        "invalid expression");
    }
    return self::arrayLast($this->operands);
  }