Beispiel #1
0
 /**
  * Sets the identifier. It can be one of the following:
  * "a", "e", "f", "n", "r", "t".
  * 
  * @param string $identifier Identifier to match
  * 
  * @return NonPrintingChar
  * 
  * @throws \REBuilder\Exception\Generic
  * 
  * @link http://php.net/manual/en/regexp.reference.escape.php
  */
 public function setIdentifier($identifier)
 {
     if (!\REBuilder\Parser\Rules::validateNonPrintingChar($identifier)) {
         throw new \REBuilder\Exception\Generic("'{$identifier}' is not a valid non-printing character identifier");
     }
     return parent::setIdentifier($identifier);
 }
Beispiel #2
0
 /**
  * Sets the identifier. It can be one of the following:
  * "b", "B", "A", "Z", "z", "G", "Q", "E", "K"
  * 
  * @param string $identifier Identifier to match
  * 
  * @return SimpleAssertion
  * 
  * @throws \REBuilder\Exception\Generic
  * 
  * @link http://php.net/manual/en/regexp.reference.escape.php
  */
 public function setIdentifier($identifier)
 {
     if (!\REBuilder\Parser\Rules::validateSimpleAssertion($identifier)) {
         throw new \REBuilder\Exception\Generic("'{$identifier}' is not a valid simple assertion type identifier");
     }
     return parent::setIdentifier($identifier);
 }
Beispiel #3
0
 /**
  * Sets the identifier. It can be one of the following:
  * "d", "D", "h", "H", "s", "S", "v", "V", "w", "W"
  * 
  * @param string $identifier Identifier to match
  * 
  * @return GenericCharType
  * 
  * @throws \REBuilder\Exception\Generic
  * 
  * @link http://php.net/manual/en/regexp.reference.escape.php
  */
 public function setIdentifier($identifier)
 {
     if (!\REBuilder\Parser\Rules::validateGenericCharType($identifier)) {
         throw new \REBuilder\Exception\Generic("'{$identifier}' is not a valid generic character type identifier");
     }
     return parent::setIdentifier($identifier);
 }