public function addRule($symbolName, AbstractExpression $expression)
    {
        $rule = new Rule($symbolName, $expression);
        $this->rules[] = $rule;
    }
public function addRule($symbolName, AbstractExpression $expression)
    {
        $rule = new Rule($symbolName, $expression);
        $this->rules[] = $rule;
    }
public function addRule ( $ symbolName , AbstractExpression $ expression ) { $ rule = new Rule ( $ symbolName , $ expression ) ; $ this -> rules [ ] = $ rule ; }
Adds a new production rule to the set of rules

@param string $symbolName The name of the nonterminal symbol on the left side of the rule
@param AbstractExpression $expression The expression that represents the right side of the rule
Adds a new production rule to the set of rules