generated/Parser/ParserImpl.php
protected function parsePrimary()
    {
        $a = [];

        // ( '-' | 'not' | 'empty' )+
        $a1 = [];
        while (true) {
            // '-' | 'not' | 'empty'
            $o2 = $this->offset;
            while ($o2 !== null) {
                if ($this->type !== '-') { break; }
                $c2 = $this->consume();


                $o2 = null;
            }

            while ($o2 !== null) {
                if ($this->type !== 'not') { break; }
                $c2 = $this->consume();


                $o2 = null;
            }

            while ($o2 !== null) {
                if ($this->type !== 'empty') { break; }
                $c2 = $this->consume();


                $o2 = null;
            }

            if ($o2 !== null) {
                break;
            }

            $c1 = $c2;

            $a1[] = $c1;
        }

        if (!$a1) {
            return $this;
        }
        $a[] = $a1;

        if (null === ($parsed = yield 'Operand')) { $this->error("Error parsing \"Primary\" on line %s:"); }
        $a[] = $parsed;

        return ($this->action)('Primary', 'parsePrimary', $a);
    }
protected function parsePrimary()
    {
        $a = [];

        // ( '-' | 'not' | 'empty' )+
        $a1 = [];
        while (true) {
            // '-' | 'not' | 'empty'
            $o2 = $this->offset;
            while ($o2 !== null) {
                if ($this->type !== '-') { break; }
                $c2 = $this->consume();


                $o2 = null;
            }

            while ($o2 !== null) {
                if ($this->type !== 'not') { break; }
                $c2 = $this->consume();


                $o2 = null;
            }

            while ($o2 !== null) {
                if ($this->type !== 'empty') { break; }
                $c2 = $this->consume();


                $o2 = null;
            }

            if ($o2 !== null) {
                break;
            }

            $c1 = $c2;

            $a1[] = $c1;
        }

        if (!$a1) {
            return $this;
        }
        $a[] = $a1;

        if (null === ($parsed = yield 'Operand')) { $this->error("Error parsing \"Primary\" on line %s:"); }
        $a[] = $parsed;

        return ($this->action)('Primary', 'parsePrimary', $a);
    }
Primary ::= ( '-' | 'not' | 'empty' )+ Operand