8 public function __construct( $name, $generate, $follow ) {
10 $this->generate
= $generate;
11 $this->follow
= $follow;
14 public function get_name() {
18 public function generates() {
19 return $this->generate
;
22 public function produces( $symbol ) {
23 return $this->generate
== $symbol;
26 public function follow() {
29 public function follows( $symbol ) {
30 return in_array($symbol,$this->follow
);
33 public function equals( $item ) {
34 return ($item->name
== $this->name
);
37 public function __toString() {
38 $outp = sprintf( "%s: %s := error(%s)", $this->name
, $this->generate
, $this->follow
);