public function matchSymbol(Symbol $symbol)
 {
     if ($symbol instanceof EpsilonSymbol) {
         return true;
     }
     if (EpsilonSymbol::singletonInstance()->getType() == $symbol->getType()) {
         return EpsilonSymbol::singletonInstance()->toString() == $symbol->toString();
     }
     return false;
 }
 /**
  * @param Symbol $symbol
  * @return bool
  */
 public function matchSymbol(Symbol $symbol)
 {
     return $symbol->getType() === $this->type;
 }
 /**
  * @param Symbol $symbol
  * @return bool
  */
 public function match(Symbol $symbol)
 {
     $match = $symbol->getType() === Symbol::TYPE_TERMINAL;
     $this->matchedOne |= $match;
     return $match;
 }
 /**
  * @param Symbol $symbol
  * @return ExpressionSymbol
  */
 public static function createAdapterForSymbol(Symbol $symbol)
 {
     $expression = new self($symbol->getType(), $symbol->toString());
     return $expression;
 }